@ddunigma/node 1.1.7 → 2.0.0
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 +4 -0
- package/dist/cjs/base/BaseDdu.js +1 -1
- package/dist/cjs/encoders/Ddu64.d.ts +22 -9
- package/dist/cjs/encoders/Ddu64.js +407 -259
- package/dist/mjs/encoders/Ddu64.d.ts +22 -9
- package/dist/mjs/encoders/Ddu64.js +408 -255
- package/package.json +4 -1
|
@@ -11,19 +11,17 @@ export declare class Ddu64 extends BaseDdu {
|
|
|
11
11
|
private readonly isPredefinedCharSet;
|
|
12
12
|
private readonly effectiveBitLength;
|
|
13
13
|
private readonly maxBinaryValue;
|
|
14
|
-
private readonly binaryChunkToIntFn;
|
|
15
|
-
private readonly indexToBinaryCache;
|
|
16
14
|
constructor(dduChar?: string[] | string, paddingChar?: string, dduOptions?: DduConstructorOptions);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
/**
|
|
16
|
+
* 데이터를 DDU 포맷으로 인코딩합니다.
|
|
17
|
+
* 성능을 위해 24비트 이하는 Fast Path(number 연산)를 사용합니다.
|
|
18
|
+
*/
|
|
20
19
|
encode(input: Buffer | string, _options?: DduOptions): string;
|
|
21
|
-
decodeToBuffer(input: string, _options?: DduOptions): Buffer;
|
|
22
|
-
decode(input: string, _options?: DduOptions): string;
|
|
23
20
|
/**
|
|
24
|
-
*
|
|
25
|
-
* 인코더의 내부 상태 정보를 반환
|
|
21
|
+
* DDU 포맷 문자열을 버퍼로 디코딩합니다.
|
|
26
22
|
*/
|
|
23
|
+
decodeToBuffer(input: string, _options?: DduOptions): Buffer;
|
|
24
|
+
decode(input: string, _options?: DduOptions): string;
|
|
27
25
|
getCharSetInfo(): {
|
|
28
26
|
charSet: string[];
|
|
29
27
|
paddingChar: string;
|
|
@@ -32,4 +30,19 @@ export declare class Ddu64 extends BaseDdu {
|
|
|
32
30
|
usePowerOfTwo: boolean;
|
|
33
31
|
encoding: BufferEncoding;
|
|
34
32
|
};
|
|
33
|
+
private encodeFast;
|
|
34
|
+
private decodeFast;
|
|
35
|
+
private encodeBigInt;
|
|
36
|
+
private decodeBigInt;
|
|
37
|
+
private parsePaddingAndGetInput;
|
|
38
|
+
/**
|
|
39
|
+
* 입력된 CharSet을 검증하고 정리(Normalization)합니다.
|
|
40
|
+
* 문제가 발생하면 옵션에 따라 Error를 던지거나 Fallback CharSet을 반환합니다.
|
|
41
|
+
*/
|
|
42
|
+
private normalizeCharSet;
|
|
43
|
+
private resolveInitialCharSet;
|
|
44
|
+
private getFallbackCharSet;
|
|
45
|
+
private shouldUsePowerOfTwo;
|
|
46
|
+
private getCharSetOrThrow;
|
|
47
|
+
private validateCombinationDuplicates;
|
|
35
48
|
}
|