@ddunigma/node 3.0.0 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,6 +8,13 @@ V2 추가사항
8
8
 
9
9
  - 이제 한글 종성 결합 시스템을 활용하여 8개 기본 문자 × 8개 종성으로 64가지 조합을 만들어, 6비트를 한 글자로 표현합니다.
10
10
 
11
+ ### Credits
12
+
13
+ - Original Python Implementation by:
14
+ - [@i3ls](https://github.com/i3l3)
15
+ - [@gunu3371](https://github.com/gunu3371)
16
+ - Original Repository: [ddunigma](https://github.com/i3l3/ddunigma)
17
+
11
18
  ## Requirements
12
19
 
13
20
  - **Node.js >= 18.0.0**
@@ -36,305 +43,317 @@ dduV1.decode(".우땨땨이?땨뜌.이.뜌이?이!.우우땨이?우뜌.우땨뜌
36
43
 
37
44
  ---
38
45
 
39
- ## 기본 사용법
40
-
41
- ### 인코딩/디코딩
46
+ ## Binary Data
42
47
 
43
48
  ```typescript
44
- import { Ddu64 } from "@ddunigma/node";
45
-
46
- const encoder = new Ddu64();
49
+ const ddu = new Ddu64();
50
+ const input = new Uint8Array([0, 1, 127, 128, 255]);
47
51
 
48
- const encoded = encoder.encode("Hello World!");
49
- const decoded = encoder.decode(encoded);
52
+ const encoded = ddu.encode(input);
53
+ const bytes = ddu.decodeToUint8Array(encoded);
54
+ const buffer = ddu.decodeToBuffer(encoded); // Node.js Buffer
50
55
  ```
51
56
 
52
- ### 커스텀 charset
57
+ ## Presets
53
58
 
54
59
  ```typescript
55
- // 문자열 또는 배열로 charset 지정
56
- const encoder = new Ddu64("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", "=");
60
+ import { Ddu64, DduSetSymbol } from "@ddunigma/node";
57
61
 
58
- // 종성 결합 커스텀 charset (dduChar × codaChar 동적 생성)
59
- const encoder2 = new Ddu64(["가", "나", "다", "라"], "뭐", {
60
- codaChar: ["", "ㄱ", "ㄲ", "ㄷ"], // 4×4 = 16개 조합
61
- });
62
+ // 기본값 - 한글 종성 결합 64문자
63
+ new Ddu64();
64
+
65
+ // 구버전 호환 8문자
66
+ new Ddu64(undefined, undefined, { dduSetSymbol: DduSetSymbol.DDU_V1 });
67
+
68
+ // 영문+숫자 64문자
69
+ new Ddu64(undefined, undefined, { dduSetSymbol: DduSetSymbol.ONECHARSET });
62
70
  ```
63
71
 
64
- ### 프리셋
72
+ | Symbol | 문자 수 | 설명 |
73
+ | ------------ | ------: | ---------------------------------- |
74
+ | `DDU` | 64 | 한글 기본 문자 8개 × 종성 8개 조합 |
75
+ | `DDU_V1` | 8 | 기존 8문자 쌍 방식 (하위 호환) |
76
+ | `ONECHARSET` | 64 | 영문, 숫자, 일부 특수문자 |
65
77
 
66
- | Symbol | 문자 수 | 비트 | 설명 |
67
- | ------------ | ------- | ---- | ------------------------------------ |
68
- | `DDU` | 64 | 6 | 한글 종성 결합 (8 기본문자 × 8 종성) |
69
- | `DDU_V1` | 8 | 3 | 구버전 호환 (뜌땨이우야!?.) |
70
- | `ONECHARSET` | 64 | 6 | 영문 + 숫자 + 특수문자 |
78
+ ## Custom Charset
71
79
 
72
80
  ```typescript
73
- import { Ddu64, DduSetSymbol } from "@ddunigma/node";
74
-
75
- const encoder = new Ddu64(undefined, undefined, {
76
- dduSetSymbol: DduSetSymbol.ONECHARSET,
81
+ // 문자열로 직접 지정
82
+ const base64Like = new Ddu64(
83
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
84
+ "=",
85
+ );
86
+
87
+ // 한글 종성 조합으로 커스텀 charset 생성
88
+ const hangulCoda = new Ddu64(["가", "나", "다", "라"], "뭐", {
89
+ codaChar: ["", "ㄱ", "ㄲ", "ㄷ"],
77
90
  });
91
+ // → 가, 각, 갂, 갇, 나, 낙, 낚, 낟, 다, 닥, 닦, 닫, 라, 락, 랔, 랗 (16문자)
78
92
  ```
79
93
 
80
- ---
94
+ ## CharsetBuilder
81
95
 
82
- ## 고급 기능
96
+ ```typescript
97
+ import { CharsetBuilder, Ddu64 } from "@ddunigma/node";
83
98
 
84
- ### 압축
99
+ // Base64에서 혼동 문자 제거 후 2의 제곱수로 맞추기
100
+ const { charset, padding } = CharsetBuilder.base64()
101
+ .excludeConfusing()
102
+ .limitToPowerOfTwo()
103
+ .buildWithPadding();
85
104
 
86
- deflate(기본) 또는 brotli 압축을 지원합니다. 디코딩 시 자동으로 압축 여부를 감지합니다.
105
+ const ddu = new Ddu64(charset, padding);
87
106
 
88
- ```typescript
89
- const encoder = new Ddu64();
107
+ // 유니코드 범위에서 생성
108
+ const chars = CharsetBuilder.fromUnicodeRange(0x4e00, 0x4e3f)
109
+ .shuffle(12345)
110
+ .limitToPowerOfTwo()
111
+ .build();
112
+ ```
90
113
 
91
- // 호출 시 옵션으로 지정
92
- const encoded = encoder.encode(longText, { compress: true });
93
- const decoded = encoder.decode(encoded);
114
+ ## Compression
94
115
 
95
- // 생성자에서 기본 활성화
96
- const compressEncoder = new Ddu64(undefined, undefined, {
97
- compress: true,
98
- compressionAlgorithm: "brotli",
99
- compressionLevel: 6,
116
+ ```typescript
117
+ const ddu = new Ddu64(undefined, undefined, {
118
+ compress: true, // 압축 활성화
119
+ compressionAlgorithm: "deflate", // "deflate" | "brotli"
120
+ compressionLevel: 6, // deflate: 0-9, brotli: 0-11
100
121
  });
122
+
123
+ const encoded = ddu.encode("A".repeat(1000)); // 압축되어 짧아짐
124
+ const decoded = ddu.decode(encoded);
101
125
  ```
102
126
 
103
- ### 암호화
127
+ 압축은 원본보다 작아질 때만 적용됩니다. 압축 결과가 더 크면 비압축으로 저장됩니다.
104
128
 
105
- AES-256-GCM 암호화를 내장합니다. 동일한 키로 생성된 인코더만 복호화할 수 있습니다.
129
+ ## Encryption
106
130
 
107
131
  ```typescript
108
- const encoder = new Ddu64(undefined, undefined, {
132
+ // SHA-256 파생 (기본)
133
+ const ddu = new Ddu64(undefined, undefined, {
109
134
  encryptionKey: "my-secret-key",
110
135
  });
111
136
 
112
- const encoded = encoder.encode("비밀 메시지");
113
- const decoded = encoder.decode(encoded);
137
+ const encoded = ddu.encode("secret message");
138
+ const decoded = ddu.decode(encoded); // 같은 키로만 복호화 가능
139
+
140
+ // PBKDF2 키 파생
141
+ const dduPbkdf2 = new Ddu64(undefined, undefined, {
142
+ encryptionKey: "user password",
143
+ keyDerivation: {
144
+ algorithm: "pbkdf2",
145
+ salt: "app-specific-salt",
146
+ iterations: 210_000,
147
+ hash: "SHA-256",
148
+ },
149
+ });
114
150
  ```
115
151
 
116
- ### 체크섬
117
-
118
- CRC32 체크섬으로 데이터 무결성을 검증합니다.
152
+ ## Checksum
119
153
 
120
154
  ```typescript
121
- const encoder = new Ddu64();
155
+ const ddu = new Ddu64(undefined, undefined, { checksum: true });
122
156
 
123
- const encoded = encoder.encode(data, { checksum: true });
124
- const decoded = encoder.decode(encoded, { checksum: true });
125
- // 데이터 변조 시 에러 발생
157
+ const encoded = ddu.encode("data"); // CRC32 체크섬 포함
158
+ const decoded = ddu.decode(encoded); // 무결성 검증 후 반환
126
159
  ```
127
160
 
128
- ### URL-Safe
129
-
130
- `+`, `/`, `=` 를 URL 안전 문자(`-`, `_`, `.`)로 변환합니다.
161
+ ## URL-Safe
131
162
 
132
163
  ```typescript
133
- const encoder = new Ddu64("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", "=", {
164
+ const ddu = new Ddu64("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", "=", {
134
165
  urlSafe: true,
135
166
  });
136
- ```
137
167
 
138
- > charset/padding에 `-`, `_`, `.` 포함되면 urlSafe를 활성화할 수 없습니다.
168
+ // +→- /→_ =→. 자동 변환
169
+ const encoded = ddu.encode("URL safe text");
170
+ ```
139
171
 
140
- ### 청크 분할
172
+ ## Chunking
141
173
 
142
174
  ```typescript
143
- const encoder = new Ddu64();
144
-
145
- const encoded = encoder.encode(data, {
175
+ const ddu = new Ddu64(undefined, undefined, {
146
176
  chunkSize: 76,
147
177
  chunkSeparator: "\n",
148
178
  });
149
- // 디코딩 시 구분자 자동 제거
150
- ```
151
-
152
- ### 비동기 처리
153
-
154
- 대용량 데이터에서 이벤트 루프 블로킹을 방지합니다.
155
179
 
156
- ```typescript
157
- const encoded = await encoder.encodeAsync(largeBuffer);
158
- const decoded = await encoder.decodeAsync(encoded);
159
- const buffer = await encoder.decodeToBufferAsync(encoded);
180
+ const encoded = ddu.encode("long data ".repeat(100));
181
+ // 76자마다 줄바꿈 삽입
160
182
  ```
161
183
 
162
- ### 진행률 콜백
184
+ ## Obfuscation (한글 난독화)
163
185
 
164
186
  ```typescript
165
- encoder.encode(data, {
166
- onProgress: ({ percent, stage }) => {
167
- console.log(`${percent}% (${stage})`);
168
- },
187
+ const ddu = new Ddu64(undefined, undefined, {
188
+ encryptionKey: "secret",
189
+ obfuscate: true, // 암호화 필수
169
190
  });
191
+
192
+ const encoded = ddu.encode("hello");
193
+ // 출력이 한글 음절 블록(U+AC00–U+D7A3)으로 변환됨
170
194
  ```
171
195
 
172
- ### 통계
196
+ ## Async (브라우저 호환)
173
197
 
174
198
  ```typescript
175
- const stats = encoder.getStats(data, { compress: true });
176
- // { originalSize, encodedSize, compressedSize, compressionRatio, expansionRatio, charsetSize, bitLength }
199
+ // 브라우저에서는 async 메서드 사용
200
+ import { Ddu64 } from "@ddunigma/node/browser";
201
+
202
+ const ddu = new Ddu64();
203
+ const encoded = await ddu.encodeAsync("browser text");
204
+ const decoded = await ddu.decodeAsync(encoded);
177
205
  ```
178
206
 
179
- ### Zip Bomb 방어
207
+ Node.js에서도 async 메서드를 사용할 수 있습니다. 브라우저 진입점(`@ddunigma/node/browser`)은 Node.js 내장 모듈을 임포트하지 않습니다.
208
+
209
+ ## Web Streams
180
210
 
181
211
  ```typescript
182
- const encoder = new Ddu64(undefined, undefined, {
183
- maxDecodedBytes: 10 * 1024 * 1024, // 10MB
184
- maxDecompressedBytes: 50 * 1024 * 1024, // 50MB
212
+ import { Ddu64, createReadableEncodeStream, createReadableDecodeStream } from "@ddunigma/node";
213
+
214
+ const ddu = new Ddu64(undefined, undefined, {
215
+ compress: true,
216
+ encryptionKey: "stream-key",
185
217
  });
186
- ```
187
218
 
188
- ---
219
+ const encodedStream = readableByteStream.pipeThrough(
220
+ createReadableEncodeStream(ddu, { compress: true }),
221
+ );
189
222
 
190
- ## CharsetBuilder
223
+ const decodedStream = encodedStream.pipeThrough(createReadableDecodeStream(ddu));
224
+ ```
191
225
 
192
- 커스텀 charset을 빌더 패턴으로 생성합니다.
226
+ ## WASM Acceleration
193
227
 
194
228
  ```typescript
195
- import { CharsetBuilder } from "@ddunigma/node";
196
-
197
- // 유니코드 범위
198
- CharsetBuilder.fromUnicodeRange(0x4e00, 0x4e3f).build();
229
+ import { Ddu64, preloadWasm } from "@ddunigma/node";
199
230
 
200
- // Base64에서 혼동 문자 제외
201
- CharsetBuilder.base64().excludeConfusing().build();
231
+ await preloadWasm(); // 선택적 사전 로드
202
232
 
203
- // 2의 제곱수로 제한 + 시드 셔플
204
- CharsetBuilder.fromString("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
205
- .limitToPowerOfTwo()
206
- .shuffle(12345)
207
- .build();
233
+ const ddu = new Ddu64(undefined, undefined, {
234
+ wasmThreshold: 4096, // 이 크기 이상일 때 WASM 사용
235
+ });
208
236
 
209
- // 패딩 문자 자동 선택
210
- const { charset, padding } = CharsetBuilder.base64().buildWithPadding();
237
+ const encoded = ddu.encode(new Uint8Array(1024 * 1024));
211
238
  ```
212
239
 
213
- ---
214
-
215
- ## DduPipeline
240
+ WASM을 사용할 수 없으면 JavaScript로 자동 폴백됩니다.
216
241
 
217
- 압축 암호화 → 인코딩을 체이닝하고, `reverse()`로 역순 복원합니다.
242
+ ## Progress Callback
218
243
 
219
244
  ```typescript
220
- import { DduPipeline, Ddu64 } from "@ddunigma/node";
221
-
222
- const pipeline = new DduPipeline().compress(6, "brotli").encrypt("secret-key").encode(new Ddu64());
245
+ const ddu = new Ddu64(undefined, undefined, { compress: true });
223
246
 
224
- const encoded = pipeline.processToString("Hello");
225
- const decoded = pipeline.reverse().processToString(encoded);
247
+ ddu.encode("data", {
248
+ onProgress: ({ percent, stage }) => {
249
+ console.log(`${stage}: ${percent}%`);
250
+ // stage: start → compress → encrypt → encode → done
251
+ },
252
+ });
226
253
  ```
227
254
 
228
- ---
229
-
230
- ## 스트림
231
-
232
- 대용량 파일을 메모리 효율적으로 처리합니다. 스트림 헤더로 압축/암호화를 자동 감지합니다.
255
+ ## Stats
233
256
 
234
257
  ```typescript
235
- import { Ddu64, createEncodeStream, createDecodeStream } from "@ddunigma/node";
236
- import fs from "fs";
258
+ const ddu = new Ddu64(undefined, undefined, { compress: true });
259
+ const stats = ddu.getStats("A".repeat(1000));
237
260
 
238
- const encoder = new Ddu64(undefined, undefined, {
239
- compress: true,
240
- encryptionKey: "stream-key",
241
- });
261
+ // { originalSize, encodedSize, compressedSize, compressionRatio, expansionRatio, charsetSize, bitLength }
262
+ ```
242
263
 
243
- fs.createReadStream("input.bin")
244
- .pipe(createEncodeStream(encoder))
245
- .pipe(fs.createWriteStream("output.ddu"));
264
+ ## Size Limits
246
265
 
247
- fs.createReadStream("output.ddu")
248
- .pipe(createDecodeStream(encoder))
249
- .pipe(fs.createWriteStream("restored.bin"));
266
+ ```typescript
267
+ const ddu = new Ddu64(undefined, undefined, {
268
+ maxDecodedBytes: 10 * 1024 * 1024, // 디코딩 최대 크기 (기본 64MB)
269
+ maxDecompressedBytes: 50 * 1024 * 1024, // 압축해제 최대 크기 (기본 64MB)
270
+ });
250
271
  ```
251
272
 
252
273
  ---
253
274
 
254
- ## API Reference
255
-
256
- ### `new Ddu64(dduChar?, paddingChar?, options?)`
257
-
258
- | Parameter | Type | Description |
259
- | ------------- | ----------------------- | ------------------------ |
260
- | `dduChar` | `string \| string[]` | charset 문자열 또는 배열 |
261
- | `paddingChar` | `string` | 패딩 문자 |
262
- | `options` | `DduConstructorOptions` | 옵션 객체 |
263
-
264
- **생성자 옵션:**
265
-
266
- | Option | Type | Default | Description |
267
- | ---------------------- | ----------------------- | ----------- | ----------------------------- |
268
- | `dduSetSymbol` | `DduSetSymbol` | `DDU` | 프리셋 심볼 |
269
- | `codaChar` | `string[]` | — | 종성 배열 (동적 charset 생성) |
270
- | `encoding` | `BufferEncoding` | `'utf-8'` | 문자열 인코딩 |
271
- | `compress` | `boolean` | `false` | 기본 압축 활성화 |
272
- | `compressionAlgorithm` | `"deflate" \| "brotli"` | `'deflate'` | 압축 알고리즘 |
273
- | `compressionLevel` | `number` | `6` | 압축 레벨 |
274
- | `urlSafe` | `boolean` | `false` | URL-Safe 모드 |
275
- | `encryptionKey` | `string` | — | AES-256-GCM 암호화 키 |
276
- | `checksum` | `boolean` | `false` | CRC32 체크섬 |
277
- | `chunkSize` | `number` | — | 청크 분할 크기 |
278
- | `chunkSeparator` | `string` | `'\n'` | 청크 구분자 |
279
- | `maxDecodedBytes` | `number` | `67108864` | 최대 디코딩 바이트 (64MB) |
280
- | `maxDecompressedBytes` | `number` | `67108864` | 최대 압축해제 바이트 (64MB) |
281
- | `throwOnError` | `boolean` | `false` | 초기화 오류 시 throw |
282
- | `useRepeatPadding` | `boolean` | `false` | 패딩 문자 반복 방식 |
283
- | `usePowerOfTwo` | `boolean` | `true` | 2의 제곱수 charset 강제 |
284
-
285
- **메서드:**
286
-
287
- | Method | Return | Description |
288
- | ---------------------------------------- | ----------------- | -------------------- |
289
- | `encode(data, options?)` | `string` | 인코딩 |
290
- | `decode(encoded, options?)` | `string` | 디코딩 |
291
- | `decodeToBuffer(encoded, options?)` | `Buffer` | Buffer로 디코딩 |
292
- | `encodeAsync(data, options?)` | `Promise<string>` | 비동기 인코딩 |
293
- | `decodeAsync(encoded, options?)` | `Promise<string>` | 비동기 디코딩 |
294
- | `decodeToBufferAsync(encoded, options?)` | `Promise<Buffer>` | 비동기 Buffer 디코딩 |
295
- | `getStats(data, options?)` | `DduEncodeStats` | 인코딩 통계 |
296
- | `getCharSetInfo()` | `CharSetInfo` | charset 정보 |
297
-
298
- **encode/decode 옵션 (DduOptions):**
299
-
300
- | Option | Type | Description |
301
- | ---------------------- | ----------------------- | -------------------- |
302
- | `compress` | `boolean` | 압축 사용 |
303
- | `compressionAlgorithm` | `"deflate" \| "brotli"` | 압축 알고리즘 |
304
- | `compressionLevel` | `number` | 압축 레벨 |
305
- | `checksum` | `boolean` | 체크섬 추가/검증 |
306
- | `chunkSize` | `number` | 청크 분할 크기 |
307
- | `chunkSeparator` | `string` | 청크 구분자 |
308
- | `maxDecodedBytes` | `number` | 최대 디코딩 바이트 |
309
- | `maxDecompressedBytes` | `number` | 최대 압축해제 바이트 |
310
- | `onProgress` | `function` | 진행률 콜백 |
275
+ ## API
311
276
 
312
- ---
277
+ ```typescript
278
+ class Ddu64 {
279
+ encode(data: string | Uint8Array, options?: DduOptions): string;
280
+ decode(encoded: string, options?: DduOptions): string;
281
+ decodeToUint8Array(encoded: string, options?: DduOptions): Uint8Array;
282
+ decodeToBuffer(encoded: string, options?: DduOptions): Buffer;
283
+
284
+ encodeAsync(data: string | Uint8Array, options?: DduOptions): Promise<string>;
285
+ decodeAsync(encoded: string, options?: DduOptions): Promise<string>;
286
+ decodeToUint8ArrayAsync(encoded: string, options?: DduOptions): Promise<Uint8Array>;
287
+ decodeToBufferAsync(encoded: string, options?: DduOptions): Promise<Buffer>;
288
+
289
+ getStats(data: string | Uint8Array, options?: DduOptions): DduEncodeStats;
290
+ getCharSetInfo(): CharSetInfo;
291
+
292
+ static setWorkerPoolSize(n: number): void;
293
+ }
294
+ ```
313
295
 
314
- ## Testing
296
+ ## Constructor Options
315
297
 
316
- ```bash
317
- pnpm test # 전체 테스트
318
- pnpm test:watch # 워치 모드
319
- pnpm test:coverage # 커버리지
298
+ ```typescript
299
+ new Ddu64(dduChar?, paddingChar?, options?);
320
300
  ```
321
301
 
322
- ## Build & Verify
302
+ | Option | Type | Default | 설명 |
303
+ | ---------------------- | ----------------------- | ----------- | --------------------- |
304
+ | `dduSetSymbol` | `DduSetSymbol` | `DDU` | 프리셋 선택 |
305
+ | `dduChar` | `string \| string[]` | - | 커스텀 charset |
306
+ | `paddingChar` | `string` | - | 패딩 문자 |
307
+ | `codaChar` | `string[]` | - | 종성 조합 문자 |
308
+ | `compress` | `boolean` | `false` | 압축 활성화 |
309
+ | `compressionAlgorithm` | `"deflate" \| "brotli"` | `"deflate"` | 압축 알고리즘 |
310
+ | `compressionLevel` | `number` | `6` | 압축 레벨 |
311
+ | `encryptionKey` | `string` | - | AES-256-GCM 암호화 키 |
312
+ | `keyDerivation` | `KeyDerivationOptions` | `sha256` | 키 파생 방식 |
313
+ | `checksum` | `boolean` | `false` | CRC32 체크섬 |
314
+ | `urlSafe` | `boolean` | `false` | URL-Safe 변환 |
315
+ | `obfuscate` | `boolean` | `false` | 한글 난독화 |
316
+ | `chunkSize` | `number` | - | 청크 분할 크기 |
317
+ | `chunkSeparator` | `string` | `"\n"` | 청크 구분자 |
318
+ | `maxDecodedBytes` | `number` | `67108864` | 디코딩 크기 제한 |
319
+ | `maxDecompressedBytes` | `number` | `67108864` | 압축해제 크기 제한 |
320
+ | `wasmThreshold` | `number` | `4096` | WASM 사용 임계값 |
321
+ | `throwOnError` | `boolean` | `false` | 초기화 에러 시 throw |
322
+
323
+ ## Per-Call Options
324
+
325
+ `encode`, `decode`, `encodeAsync`, `decodeAsync` 등에서 호출별로 오버라이드 가능:
326
+
327
+ | Option | Type | 설명 |
328
+ | ---------------------- | ----------------------- | ------------------ |
329
+ | `compress` | `boolean` | 압축 사용 여부 |
330
+ | `compressionAlgorithm` | `"deflate" \| "brotli"` | 압축 알고리즘 |
331
+ | `compressionLevel` | `number` | 압축 레벨 |
332
+ | `encrypt` | `boolean` | 암호화 사용 여부 |
333
+ | `checksum` | `boolean` | 체크섬 사용 여부 |
334
+ | `obfuscate` | `boolean` | 난독화 사용 여부 |
335
+ | `chunkSize` | `number` | 청크 크기 |
336
+ | `maxDecodedBytes` | `number` | 디코딩 크기 제한 |
337
+ | `maxDecompressedBytes` | `number` | 압축해제 크기 제한 |
338
+ | `onProgress` | `(info) => void` | 진행률 콜백 |
339
+
340
+ ## Entry Points
341
+
342
+ | Import Path | 용도 |
343
+ | ------------------------ | ------------------------------------- |
344
+ | `@ddunigma/node` | Node.js 전체 기능 (동기+비동기) |
345
+ | `@ddunigma/node/browser` | 브라우저 최적화 (Node.js 모듈 미포함) |
346
+ | `@ddunigma/node/core` | 최소 코어 (인코딩/디코딩만) |
347
+
348
+ ## Build & Test
323
349
 
324
350
  ```bash
351
+ pnpm test
325
352
  pnpm build
326
353
  pnpm lint
327
354
  pnpm bench
328
- pnpm pack:check
329
355
  ```
330
356
 
331
- ---
332
-
333
- ## Credits
334
-
335
- - Original: [@i3ls](https://github.com/i3l3), [@gunu3371](https://github.com/gunu3371)
336
- - Repository: [ddunigma](https://github.com/i3l3/ddunigma)
337
-
338
357
  ## License
339
358
 
340
359
  BSD-2-Clause