zstd-wasm-vn 1.2.0 → 1.2.1
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/bundler/zstd_wasm_vn.d.ts +86 -75
- package/bundler/zstd_wasm_vn.js +5 -1
- package/bundler/zstd_wasm_vn_bg.js +230 -229
- package/bundler/zstd_wasm_vn_bg.wasm +0 -0
- package/bundler/zstd_wasm_vn_bg.wasm.d.ts +13 -12
- package/deno/zstd_wasm_vn.d.ts +86 -75
- package/deno/zstd_wasm_vn.js +227 -219
- package/deno/zstd_wasm_vn_bg.wasm +0 -0
- package/deno/zstd_wasm_vn_bg.wasm.d.ts +13 -12
- package/esm/zstd_wasm_vn.d.ts +86 -75
- package/esm/zstd_wasm_vn.js +444 -10
- package/esm/zstd_wasm_vn_bg.wasm +0 -0
- package/esm/zstd_wasm_vn_bg.wasm.d.ts +13 -12
- package/module/zstd_wasm_vn.d.ts +86 -75
- package/module/zstd_wasm_vn.js +227 -220
- package/module/zstd_wasm_vn_bg.wasm +0 -0
- package/module/zstd_wasm_vn_bg.wasm.d.ts +13 -12
- package/no-modules/zstd_wasm_vn.d.ts +170 -159
- package/no-modules/zstd_wasm_vn.js +269 -275
- package/no-modules/zstd_wasm_vn_bg.wasm +0 -0
- package/no-modules/zstd_wasm_vn_bg.wasm.d.ts +13 -12
- package/nodejs/zstd_wasm_vn.d.ts +86 -75
- package/nodejs/zstd_wasm_vn.js +243 -233
- package/nodejs/zstd_wasm_vn_bg.wasm +0 -0
- package/nodejs/zstd_wasm_vn_bg.wasm.d.ts +13 -12
- package/package.json +1 -1
- package/web/zstd_wasm_vn.d.ts +139 -126
- package/web/zstd_wasm_vn.js +269 -273
- package/web/zstd_wasm_vn_bg.wasm +0 -0
- package/web/zstd_wasm_vn_bg.wasm.d.ts +13 -12
- package/esm/zstd_wasm_vn_bg.js +0 -438
package/deno/zstd_wasm_vn.d.ts
CHANGED
|
@@ -1,5 +1,88 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* ZSTD compression and decompression for WebAssembly
|
|
6
|
+
*/
|
|
7
|
+
export class Zstd {
|
|
8
|
+
private constructor();
|
|
9
|
+
free(): void;
|
|
10
|
+
[Symbol.dispose](): void;
|
|
11
|
+
static compress(data: Uint8Array, level?: number | null): Uint8Array;
|
|
12
|
+
/**
|
|
13
|
+
* Estimates the compressed size for planning purposes
|
|
14
|
+
*/
|
|
15
|
+
static compressBound(input_size: number): number;
|
|
16
|
+
static compress_with_dict(data: Uint8Array, dict: Uint8Array, level?: number | null): Uint8Array;
|
|
17
|
+
/**
|
|
18
|
+
* Calculates compression ratio (smaller = better compression)
|
|
19
|
+
*/
|
|
20
|
+
static compressionRatio(original_size: number, compressed_size: number): number;
|
|
21
|
+
static decompress(compressed_data: Uint8Array): Uint8Array;
|
|
22
|
+
static decompress_with_dict(compressed_data: Uint8Array, dict: Uint8Array): Uint8Array;
|
|
23
|
+
/**
|
|
24
|
+
* Returns the recommended default compression level
|
|
25
|
+
*/
|
|
26
|
+
static defaultCompressionLevel(): number;
|
|
27
|
+
/**
|
|
28
|
+
* Returns the maximum compression level
|
|
29
|
+
*/
|
|
30
|
+
static maxCompressionLevel(): number;
|
|
31
|
+
/**
|
|
32
|
+
* Returns the minimum compression level
|
|
33
|
+
*/
|
|
34
|
+
static minCompressionLevel(): number;
|
|
35
|
+
/**
|
|
36
|
+
* Calculates space savings percentage
|
|
37
|
+
*/
|
|
38
|
+
static spaceSavings(original_size: number, compressed_size: number): number;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* ==================================== [Streaming] ====================================
|
|
43
|
+
* Streaming compression for large data
|
|
44
|
+
*/
|
|
45
|
+
export class ZstdCompressor {
|
|
46
|
+
free(): void;
|
|
47
|
+
[Symbol.dispose](): void;
|
|
48
|
+
/**
|
|
49
|
+
* Compresses a chunk of data
|
|
50
|
+
*/
|
|
51
|
+
compress_chunk(data: Uint8Array): void;
|
|
52
|
+
/**
|
|
53
|
+
* Finalizes compression and returns the compressed data
|
|
54
|
+
*/
|
|
55
|
+
finalize(): Uint8Array;
|
|
56
|
+
/**
|
|
57
|
+
* Creates a new streaming compressor
|
|
58
|
+
*/
|
|
59
|
+
constructor(level?: number | null);
|
|
60
|
+
/**
|
|
61
|
+
* Flush the internal buffer to get compressed data for this chunk
|
|
62
|
+
*/
|
|
63
|
+
split_off_chunk(at: number): Uint8Array;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Streaming decompression for large data
|
|
68
|
+
*/
|
|
69
|
+
export class ZstdDecompressor {
|
|
70
|
+
free(): void;
|
|
71
|
+
[Symbol.dispose](): void;
|
|
72
|
+
/**
|
|
73
|
+
* Decompresses a chunk of data
|
|
74
|
+
*/
|
|
75
|
+
decompress_chunk(max_output_size: number): Uint8Array;
|
|
76
|
+
/**
|
|
77
|
+
* Decompresses all remaining data and consumes the decoder.
|
|
78
|
+
*/
|
|
79
|
+
finalize(): Uint8Array;
|
|
80
|
+
/**
|
|
81
|
+
* Creates a new streaming decompressor
|
|
82
|
+
*/
|
|
83
|
+
constructor(compressed_data: Uint8Array);
|
|
84
|
+
}
|
|
85
|
+
|
|
3
86
|
/**
|
|
4
87
|
* Compresses data using Zstandard compression
|
|
5
88
|
*
|
|
@@ -9,6 +92,7 @@
|
|
|
9
92
|
* * `level` - Compression level (1-22, default 6). Higher = better compression but slower
|
|
10
93
|
*/
|
|
11
94
|
export function compress(data: Uint8Array, level?: number | null): Uint8Array;
|
|
95
|
+
|
|
12
96
|
/**
|
|
13
97
|
* Compresses data using Zstandard compression with a dictionary
|
|
14
98
|
*
|
|
@@ -19,6 +103,7 @@ export function compress(data: Uint8Array, level?: number | null): Uint8Array;
|
|
|
19
103
|
* * `level` - Compression level (1-22, default 6). Higher = better compression but slower
|
|
20
104
|
*/
|
|
21
105
|
export function compress_with_dict(data: Uint8Array, dict: Uint8Array, level?: number | null): Uint8Array;
|
|
106
|
+
|
|
22
107
|
/**
|
|
23
108
|
* Decompresses Zstandard compressed data
|
|
24
109
|
*
|
|
@@ -27,6 +112,7 @@ export function compress_with_dict(data: Uint8Array, dict: Uint8Array, level?: n
|
|
|
27
112
|
* * `compressed_data` - Zstandard compressed data
|
|
28
113
|
*/
|
|
29
114
|
export function decompress(compressed_data: Uint8Array): Uint8Array;
|
|
115
|
+
|
|
30
116
|
/**
|
|
31
117
|
* Decompresses Zstandard compressed data using a dictionary
|
|
32
118
|
*
|
|
@@ -36,78 +122,3 @@ export function decompress(compressed_data: Uint8Array): Uint8Array;
|
|
|
36
122
|
* * `dict` - The decompression dictionary (must match the compression dictionary)
|
|
37
123
|
*/
|
|
38
124
|
export function decompress_with_dict(data: Uint8Array, dict: Uint8Array): Uint8Array;
|
|
39
|
-
/**
|
|
40
|
-
* ZSTD compression and decompression for WebAssembly
|
|
41
|
-
*/
|
|
42
|
-
export class Zstd {
|
|
43
|
-
private constructor();
|
|
44
|
-
free(): void;
|
|
45
|
-
[Symbol.dispose](): void;
|
|
46
|
-
static compress(data: Uint8Array, level?: number | null): Uint8Array;
|
|
47
|
-
static compress_with_dict(data: Uint8Array, dict: Uint8Array, level?: number | null): Uint8Array;
|
|
48
|
-
static decompress(compressed_data: Uint8Array): Uint8Array;
|
|
49
|
-
static decompress_with_dict(compressed_data: Uint8Array, dict: Uint8Array): Uint8Array;
|
|
50
|
-
/**
|
|
51
|
-
* Returns the recommended default compression level
|
|
52
|
-
*/
|
|
53
|
-
static defaultCompressionLevel(): number;
|
|
54
|
-
/**
|
|
55
|
-
* Returns the minimum compression level
|
|
56
|
-
*/
|
|
57
|
-
static minCompressionLevel(): number;
|
|
58
|
-
/**
|
|
59
|
-
* Returns the maximum compression level
|
|
60
|
-
*/
|
|
61
|
-
static maxCompressionLevel(): number;
|
|
62
|
-
/**
|
|
63
|
-
* Estimates the compressed size for planning purposes
|
|
64
|
-
*/
|
|
65
|
-
static compressBound(input_size: number): number;
|
|
66
|
-
/**
|
|
67
|
-
* Calculates compression ratio (smaller = better compression)
|
|
68
|
-
*/
|
|
69
|
-
static compressionRatio(original_size: number, compressed_size: number): number;
|
|
70
|
-
/**
|
|
71
|
-
* Calculates space savings percentage
|
|
72
|
-
*/
|
|
73
|
-
static spaceSavings(original_size: number, compressed_size: number): number;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* ==================================== [Streaming] ====================================
|
|
77
|
-
* Streaming compression for large data
|
|
78
|
-
*/
|
|
79
|
-
export class ZstdCompressor {
|
|
80
|
-
free(): void;
|
|
81
|
-
[Symbol.dispose](): void;
|
|
82
|
-
/**
|
|
83
|
-
* Creates a new streaming compressor
|
|
84
|
-
*/
|
|
85
|
-
constructor(level?: number | null);
|
|
86
|
-
/**
|
|
87
|
-
* Compresses a chunk of data
|
|
88
|
-
*/
|
|
89
|
-
compress_chunk(data: Uint8Array): void;
|
|
90
|
-
/**
|
|
91
|
-
* Finalizes compression and returns the compressed data
|
|
92
|
-
*/
|
|
93
|
-
finalize(): Uint8Array;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Streaming decompression for large data
|
|
97
|
-
*/
|
|
98
|
-
export class ZstdDecompressor {
|
|
99
|
-
free(): void;
|
|
100
|
-
[Symbol.dispose](): void;
|
|
101
|
-
/**
|
|
102
|
-
* Creates a new streaming decompressor
|
|
103
|
-
*/
|
|
104
|
-
constructor(compressed_data: Uint8Array);
|
|
105
|
-
/**
|
|
106
|
-
* Decompresses a chunk of data
|
|
107
|
-
*/
|
|
108
|
-
decompress_chunk(max_output_size: number): Uint8Array;
|
|
109
|
-
/**
|
|
110
|
-
* Decompresses all remaining data and consumes the decoder.
|
|
111
|
-
*/
|
|
112
|
-
finalize(): Uint8Array;
|
|
113
|
-
}
|