compress-utils 0.7.0 → 0.8.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 +65 -49
- package/dist/algorithms/brotli/brotli.wasm +0 -0
- package/dist/algorithms/brotli/compress/brotli.wasm +0 -0
- package/dist/algorithms/brotli/compress/index.d.ts +8 -0
- package/dist/algorithms/brotli/compress/index.d.ts.map +1 -0
- package/dist/algorithms/brotli/compress/index.js +15 -0
- package/dist/algorithms/brotli/compress/index.js.map +1 -0
- package/dist/algorithms/brotli/decompress/brotli.wasm +0 -0
- package/dist/algorithms/brotli/decompress/index.d.ts +9 -0
- package/dist/algorithms/brotli/decompress/index.d.ts.map +1 -0
- package/dist/algorithms/brotli/decompress/index.js +16 -0
- package/dist/algorithms/brotli/decompress/index.js.map +1 -0
- package/dist/algorithms/bz2/bz2.wasm +0 -0
- package/dist/algorithms/bz2/compress/bz2.wasm +0 -0
- package/dist/algorithms/bz2/compress/index.d.ts +8 -0
- package/dist/algorithms/bz2/compress/index.d.ts.map +1 -0
- package/dist/algorithms/bz2/compress/index.js +15 -0
- package/dist/algorithms/bz2/compress/index.js.map +1 -0
- package/dist/algorithms/bz2/decompress/bz2.wasm +0 -0
- package/dist/algorithms/bz2/decompress/index.d.ts +9 -0
- package/dist/algorithms/bz2/decompress/index.d.ts.map +1 -0
- package/dist/algorithms/bz2/decompress/index.js +16 -0
- package/dist/algorithms/bz2/decompress/index.js.map +1 -0
- package/dist/algorithms/gzip/compress/gzip.wasm +0 -0
- package/dist/algorithms/gzip/compress/index.d.ts +8 -0
- package/dist/algorithms/gzip/compress/index.d.ts.map +1 -0
- package/dist/algorithms/gzip/compress/index.js +15 -0
- package/dist/algorithms/gzip/compress/index.js.map +1 -0
- package/dist/algorithms/gzip/decompress/gzip.wasm +0 -0
- package/dist/algorithms/gzip/decompress/index.d.ts +9 -0
- package/dist/algorithms/gzip/decompress/index.d.ts.map +1 -0
- package/dist/algorithms/gzip/decompress/index.js +16 -0
- package/dist/algorithms/gzip/decompress/index.js.map +1 -0
- package/dist/algorithms/gzip/gzip.wasm +0 -0
- package/dist/algorithms/gzip/index.d.ts +12 -0
- package/dist/algorithms/gzip/index.d.ts.map +1 -0
- package/dist/algorithms/gzip/index.js +17 -0
- package/dist/algorithms/gzip/index.js.map +1 -0
- package/dist/algorithms/lz4/compress/index.d.ts +8 -0
- package/dist/algorithms/lz4/compress/index.d.ts.map +1 -0
- package/dist/algorithms/lz4/compress/index.js +15 -0
- package/dist/algorithms/lz4/compress/index.js.map +1 -0
- package/dist/algorithms/lz4/compress/lz4.wasm +0 -0
- package/dist/algorithms/lz4/decompress/index.d.ts +9 -0
- package/dist/algorithms/lz4/decompress/index.d.ts.map +1 -0
- package/dist/algorithms/lz4/decompress/index.js +16 -0
- package/dist/algorithms/lz4/decompress/index.js.map +1 -0
- package/dist/algorithms/lz4/decompress/lz4.wasm +0 -0
- package/dist/algorithms/lz4/lz4.wasm +0 -0
- package/dist/algorithms/snappy/compress/index.d.ts +8 -0
- package/dist/algorithms/snappy/compress/index.d.ts.map +1 -0
- package/dist/algorithms/snappy/compress/index.js +15 -0
- package/dist/algorithms/snappy/compress/index.js.map +1 -0
- package/dist/algorithms/snappy/compress/snappy.wasm +0 -0
- package/dist/algorithms/snappy/decompress/index.d.ts +9 -0
- package/dist/algorithms/snappy/decompress/index.d.ts.map +1 -0
- package/dist/algorithms/snappy/decompress/index.js +16 -0
- package/dist/algorithms/snappy/decompress/index.js.map +1 -0
- package/dist/algorithms/snappy/decompress/snappy.wasm +0 -0
- package/dist/algorithms/snappy/index.d.ts +12 -0
- package/dist/algorithms/snappy/index.d.ts.map +1 -0
- package/dist/algorithms/snappy/index.js +17 -0
- package/dist/algorithms/snappy/index.js.map +1 -0
- package/dist/algorithms/snappy/snappy.wasm +0 -0
- package/dist/algorithms/xz/compress/index.d.ts +8 -0
- package/dist/algorithms/xz/compress/index.d.ts.map +1 -0
- package/dist/algorithms/xz/compress/index.js +15 -0
- package/dist/algorithms/xz/compress/index.js.map +1 -0
- package/dist/algorithms/xz/compress/xz.wasm +0 -0
- package/dist/algorithms/xz/decompress/index.d.ts +9 -0
- package/dist/algorithms/xz/decompress/index.d.ts.map +1 -0
- package/dist/algorithms/xz/decompress/index.js +16 -0
- package/dist/algorithms/xz/decompress/index.js.map +1 -0
- package/dist/algorithms/xz/decompress/xz.wasm +0 -0
- package/dist/algorithms/xz/xz.wasm +0 -0
- package/dist/algorithms/zlib/compress/index.d.ts +8 -0
- package/dist/algorithms/zlib/compress/index.d.ts.map +1 -0
- package/dist/algorithms/zlib/compress/index.js +15 -0
- package/dist/algorithms/zlib/compress/index.js.map +1 -0
- package/dist/algorithms/zlib/compress/zlib.wasm +0 -0
- package/dist/algorithms/zlib/decompress/index.d.ts +9 -0
- package/dist/algorithms/zlib/decompress/index.d.ts.map +1 -0
- package/dist/algorithms/zlib/decompress/index.js +16 -0
- package/dist/algorithms/zlib/decompress/index.js.map +1 -0
- package/dist/algorithms/zlib/decompress/zlib.wasm +0 -0
- package/dist/algorithms/zlib/zlib.wasm +0 -0
- package/dist/algorithms/zstd/compress/index.d.ts +8 -0
- package/dist/algorithms/zstd/compress/index.d.ts.map +1 -0
- package/dist/algorithms/zstd/compress/index.js +15 -0
- package/dist/algorithms/zstd/compress/index.js.map +1 -0
- package/dist/algorithms/zstd/compress/zstd.wasm +0 -0
- package/dist/algorithms/zstd/decompress/index.d.ts +9 -0
- package/dist/algorithms/zstd/decompress/index.d.ts.map +1 -0
- package/dist/algorithms/zstd/decompress/index.js +16 -0
- package/dist/algorithms/zstd/decompress/index.js.map +1 -0
- package/dist/algorithms/zstd/decompress/zstd.wasm +0 -0
- package/dist/algorithms/zstd/zstd.wasm +0 -0
- package/dist/core/types.d.ts +4 -2
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -1
- package/package.json +24 -4
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/compress-utils)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
|
-
Unified WebAssembly bindings for
|
|
8
|
+
Unified WebAssembly bindings for eight compression algorithms: Brotli, bzip2, LZ4, XZ/LZMA, zlib, Zstandard, Snappy, and gzip. Same API for every algorithm, in every JavaScript runtime, with tree-shakeable imports so bundlers ship only what you use.
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
@@ -14,7 +14,26 @@ npm install compress-utils
|
|
|
14
14
|
# or: pnpm add / yarn add / bun add / deno add npm:compress-utils
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
### CDN (no bundler)
|
|
18
|
+
|
|
19
|
+
The package is published as ESM. You can pull it straight from a CDN — no install step, no build step.
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<script type="module">
|
|
23
|
+
import { compress, decompress } from
|
|
24
|
+
"https://esm.sh/compress-utils/zstd";
|
|
25
|
+
|
|
26
|
+
const out = await compress(
|
|
27
|
+
new TextEncoder().encode("hello")
|
|
28
|
+
);
|
|
29
|
+
</script>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
| CDN | Per-algo URL |
|
|
33
|
+
|------------|-----------------------------------------------------------------------|
|
|
34
|
+
| esm.sh | `https://esm.sh/compress-utils/<algo>` |
|
|
35
|
+
| jsDelivr | `https://cdn.jsdelivr.net/npm/compress-utils/dist/algorithms/<algo>/index.js` |
|
|
36
|
+
| unpkg | `https://unpkg.com/compress-utils/dist/algorithms/<algo>/index.js` |
|
|
18
37
|
|
|
19
38
|
## Quick start
|
|
20
39
|
|
|
@@ -29,7 +48,7 @@ const compressed = await compress(input, { level: 9 });
|
|
|
29
48
|
const restored = await decompress(compressed);
|
|
30
49
|
```
|
|
31
50
|
|
|
32
|
-
Available subpaths: `compress-utils/zstd`, `/brotli`, `/zlib`, `/bz2`, `/lz4`, `/xz`. Identical surface across all
|
|
51
|
+
Available subpaths: `compress-utils/zstd`, `/brotli`, `/zlib`, `/bz2`, `/lz4`, `/xz`, `/snappy`, `/gzip`. Identical surface across all eight. Each also has `/<algo>/decompress` and `/<algo>/compress` variants that ship only one direction for a much smaller `.wasm` — see [Bundle size](#bundle-size).
|
|
33
52
|
|
|
34
53
|
### Web Streams
|
|
35
54
|
|
|
@@ -57,39 +76,50 @@ If `using` isn't available in your toolchain, call `cs.destroy()` explicitly —
|
|
|
57
76
|
|
|
58
77
|
## Supported algorithms
|
|
59
78
|
|
|
60
|
-
| Algorithm | Subpath |
|
|
61
|
-
|
|
62
|
-
| zlib | `compress-utils/zlib` |
|
|
63
|
-
| bzip2 | `compress-utils/bz2` |
|
|
64
|
-
| XZ/LZMA | `compress-utils/xz` |
|
|
65
|
-
| LZ4 | `compress-utils/lz4` |
|
|
66
|
-
| Zstandard | `compress-utils/zstd` |
|
|
67
|
-
| Brotli | `compress-utils/brotli` |
|
|
79
|
+
| Algorithm | Subpath | Wire format produced |
|
|
80
|
+
|-----------|--------------------------|--------------------------------------------|
|
|
81
|
+
| zlib | `compress-utils/zlib` | zlib wrapper (RFC 1950) |
|
|
82
|
+
| bzip2 | `compress-utils/bz2` | bzip2 stream |
|
|
83
|
+
| XZ/LZMA | `compress-utils/xz` | XZ stream with CRC64 |
|
|
84
|
+
| LZ4 | `compress-utils/lz4` | LZ4 frame (compatible with `.lz4` files) |
|
|
85
|
+
| Zstandard | `compress-utils/zstd` | ZSTD frame with content size |
|
|
86
|
+
| Brotli | `compress-utils/brotli` | raw Brotli stream |
|
|
87
|
+
| Snappy | `compress-utils/snappy` | Raw Snappy block |
|
|
88
|
+
| gzip | `compress-utils/gzip` | gzip stream (RFC 1952) |
|
|
68
89
|
|
|
69
|
-
Imports are independent — `import "compress-utils/zstd"` and `import "compress-utils/brotli"` pull in two separate `.wasm` modules, not a combined bundle. Files marked `"sideEffects": false` so unused exports are tree-shaken aggressively.
|
|
90
|
+
Imports are independent — `import "compress-utils/zstd"` and `import "compress-utils/brotli"` pull in two separate `.wasm` modules, not a combined bundle. Files marked `"sideEffects": false` so unused exports are tree-shaken aggressively. For per-module `.wasm` sizes (and the smaller decode-only / encode-only builds), see **[Bundle size](#bundle-size)**.
|
|
70
91
|
|
|
71
|
-
##
|
|
92
|
+
## Bundle size
|
|
93
|
+
|
|
94
|
+
Importing `compress-utils/<algo>` gives you the **full** codec — compress *and* decompress. If you only need one direction (a browser that just *decompresses* fetched assets is the common case), import a directional subpath and the other half is dead-stripped from the `.wasm` entirely:
|
|
72
95
|
|
|
73
96
|
```ts
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
await version(); // "0.1.0"
|
|
81
|
-
await setMaxDecompressedSize(256 * 1024 ** 2);
|
|
82
|
-
// bound one-shot decompression (default: 1 GiB; 0 = unbounded)
|
|
83
|
-
|
|
84
|
-
try {
|
|
85
|
-
await decompress(garbage);
|
|
86
|
-
} catch (e) {
|
|
87
|
-
if (e instanceof CompressError) {
|
|
88
|
-
console.log(e.algorithm, e.code, e.message);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
97
|
+
// decoder only, 90 KB
|
|
98
|
+
import { decompress } from "compress-utils/zstd/decompress";
|
|
99
|
+
|
|
100
|
+
// or, encoder only:
|
|
101
|
+
import { compress } from "compress-utils/zstd/compress";
|
|
91
102
|
```
|
|
92
103
|
|
|
104
|
+
- **`/decompress`** exposes `decompress`, `createDecompressStream`, `decompressionStream`, `setMaxDecompressedSize`, `version`.
|
|
105
|
+
- **`/compress`** exposes `compress`, `createCompressStream`, `compressionStream`, `version`.
|
|
106
|
+
- The default subpath keeps **both**
|
|
107
|
+
|
|
108
|
+
Comparison of the gzipped sizes:
|
|
109
|
+
|
|
110
|
+
| algo | full | decompress-only | compress-only |
|
|
111
|
+
|--------|--------------:|----------------------:|----------------------:|
|
|
112
|
+
| zstd | 128K | 36K | 106K |
|
|
113
|
+
| brotli | 169K | 84K | 154K |
|
|
114
|
+
| lz4 | 39K | 15K | 35K |
|
|
115
|
+
| bz2 | 33K | 22K | 25K |
|
|
116
|
+
| xz | 62K | 43K | 51K |
|
|
117
|
+
| zlib | 33K | 25K | 26K |
|
|
118
|
+
| snappy | 36K | 32K | 28K |
|
|
119
|
+
| gzip | 80K | 52K | 60K |
|
|
120
|
+
|
|
121
|
+
The `.wasm` is the bulk of what ships; the JS glue is a few KB, shared, and tree-shaken to the methods you import.
|
|
122
|
+
|
|
93
123
|
## Compression levels
|
|
94
124
|
|
|
95
125
|
Every algorithm accepts a `level` from **1 (fastest) to 10 (smallest)**. The binding maps that to each algorithm's native range internally — you don't need to know that Zstandard goes 1–22 or zlib goes 1–9. Defaults to `5`.
|
|
@@ -105,18 +135,11 @@ Tested in CI on every release:
|
|
|
105
135
|
|
|
106
136
|
| Runtime | Status |
|
|
107
137
|
|----------------------|--------|
|
|
108
|
-
| Node 20, 22
|
|
138
|
+
| Node 20, 22, 24 | ✅ |
|
|
109
139
|
| Bun | ✅ |
|
|
110
140
|
| Deno 2.x | ✅ |
|
|
111
141
|
| Chromium / Firefox / WebKit (Playwright) | ✅ |
|
|
112
142
|
|
|
113
|
-
The package exposes the [`browser`](https://nodejs.org/api/packages.html#community-conditions-definitions), `node`, `deno`, and `bun` export conditions:
|
|
114
|
-
|
|
115
|
-
- Browser, Deno, and Bun consumers get a `fetch`-based loader → `WebAssembly.instantiateStreaming` (concurrent download + compile).
|
|
116
|
-
- Node consumers get a `fs.readFile`-based loader (Node's built-in `fetch` doesn't handle `file://`).
|
|
117
|
-
|
|
118
|
-
You don't need to configure anything — the right entry is picked automatically. The browser entry has zero references to `node:*` modules, so it bundles cleanly under Vite, esbuild, webpack 5, Rollup, etc.
|
|
119
|
-
|
|
120
143
|
## TypeScript
|
|
121
144
|
|
|
122
145
|
The package is TypeScript-first. `.d.ts` files ship alongside the JS for every subpath; no `@types/` package needed.
|
|
@@ -128,17 +151,10 @@ const opts: CompressOptions = { level: 7 };
|
|
|
128
151
|
const compressed: Uint8Array = await compress(input, opts);
|
|
129
152
|
```
|
|
130
153
|
|
|
131
|
-
## Performance notes
|
|
132
|
-
|
|
133
|
-
- The first call on a given subpath instantiates the `.wasm` module (~5–20 ms depending on size). Subsequent calls reuse the same instance.
|
|
134
|
-
- Streaming compresses/decompresses in 64 KB chunks internally — multi-GB inputs don't hold the whole result in memory.
|
|
135
|
-
- The JS layer copies bytes into and out of WebAssembly linear memory rather than handing out views, so memory growth inside the codec can never invalidate a `Uint8Array` you hold.
|
|
136
|
-
- Browsers, Deno, and Bun get `WebAssembly.instantiateStreaming` — bytes compile while they download. Node uses the buffered path because its `fetch` doesn't speak `file://`.
|
|
137
|
-
|
|
138
|
-
## Bundler notes
|
|
139
|
-
|
|
140
|
-
Per-algorithm imports + `sideEffects: false` mean modern bundlers tree-shake aggressively. A consumer that imports only `compress-utils/zstd` ships exactly one `.wasm` and only the zstd-bound TypeScript glue.
|
|
141
|
-
|
|
142
154
|
## License
|
|
143
155
|
|
|
144
156
|
MIT. See [LICENSE](https://github.com/dupontcyborg/compress-utils/blob/main/LICENSE).
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
Built by [Nico Dupont](https://nico.codes).
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const compress: (input: Uint8Array, opts?: import("./index.js").CompressOptions) => Promise<Uint8Array>;
|
|
2
|
+
export declare const createCompressStream: (opts?: import("./index.js").CompressOptions) => Promise<import("./index.js").CompressStream>;
|
|
3
|
+
export declare const compressionStream: (opts?: import("./index.js").CompressOptions) => TransformStream<Uint8Array, Uint8Array>;
|
|
4
|
+
export declare const version: () => Promise<string>;
|
|
5
|
+
export { CompressError } from "../../../core/types.js";
|
|
6
|
+
export type { CompressOptions, AlgorithmName } from "../../../core/types.js";
|
|
7
|
+
export type { CompressStream } from "../../../core/dispatch.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/algorithms/brotli/compress/index.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,QAAQ,yFAAoB,CAAC;AAC1C,eAAO,MAAM,oBAAoB,+FAAgC,CAAC;AAClE,eAAO,MAAM,iBAAiB,0FAA6B,CAAC;AAC5D,eAAO,MAAM,OAAO,uBAAmB,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC7E,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* brotli compress-only subpath. The co-located .wasm is built with the
|
|
3
|
+
* compress-only export set, so the decoder and its codec closure are
|
|
4
|
+
* dead-stripped. Surface is the encode half of `compress-utils/brotli`;
|
|
5
|
+
* for both directions import that instead.
|
|
6
|
+
*/
|
|
7
|
+
import { defineAlgorithm } from "../../../core/algorithm.js";
|
|
8
|
+
import { Algorithm } from "../../../core/types.js";
|
|
9
|
+
const bindings = /*#__PURE__*/ defineAlgorithm(Algorithm.Brotli, "brotli", new URL("./brotli.wasm", import.meta.url));
|
|
10
|
+
export const compress = bindings.compress;
|
|
11
|
+
export const createCompressStream = bindings.createCompressStream;
|
|
12
|
+
export const compressionStream = bindings.compressionStream;
|
|
13
|
+
export const version = bindings.version;
|
|
14
|
+
export { CompressError } from "../../../core/types.js";
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/algorithms/brotli/compress/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,QAAQ,GAAG,aAAa,CAAC,eAAe,CAC1C,SAAS,CAAC,MAAM,EAChB,QAAQ,EACR,IAAI,GAAG,CAAC,eAAe,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAC5C,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;AAC1C,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,oBAAoB,CAAC;AAClE,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,iBAAiB,CAAC;AAC5D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const decompress: (input: Uint8Array, opts?: import("./index.js").DecompressOptions) => Promise<Uint8Array>;
|
|
2
|
+
export declare const createDecompressStream: () => Promise<import("./index.js").DecompressStream>;
|
|
3
|
+
export declare const decompressionStream: () => TransformStream<Uint8Array, Uint8Array>;
|
|
4
|
+
export declare const version: () => Promise<string>;
|
|
5
|
+
export declare const setMaxDecompressedSize: (bytes: number) => Promise<void>;
|
|
6
|
+
export { CompressError } from "../../../core/types.js";
|
|
7
|
+
export type { DecompressOptions, AlgorithmName } from "../../../core/types.js";
|
|
8
|
+
export type { DecompressStream } from "../../../core/dispatch.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/algorithms/brotli/decompress/index.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,UAAU,2FAAsB,CAAC;AAC9C,eAAO,MAAM,sBAAsB,sDAAkC,CAAC;AACtE,eAAO,MAAM,mBAAmB,+CAA+B,CAAC;AAChE,eAAO,MAAM,OAAO,uBAAmB,CAAC;AACxC,eAAO,MAAM,sBAAsB,kCAAkC,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC/E,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* brotli decompress-only subpath. The co-located .wasm is built with the
|
|
3
|
+
* decompress-only export set, so the encoder and its codec closure are
|
|
4
|
+
* dead-stripped — a fraction of the full module. Surface is the decode half
|
|
5
|
+
* of `compress-utils/brotli`; for both directions import that instead.
|
|
6
|
+
*/
|
|
7
|
+
import { defineAlgorithm } from "../../../core/algorithm.js";
|
|
8
|
+
import { Algorithm } from "../../../core/types.js";
|
|
9
|
+
const bindings = /*#__PURE__*/ defineAlgorithm(Algorithm.Brotli, "brotli", new URL("./brotli.wasm", import.meta.url));
|
|
10
|
+
export const decompress = bindings.decompress;
|
|
11
|
+
export const createDecompressStream = bindings.createDecompressStream;
|
|
12
|
+
export const decompressionStream = bindings.decompressionStream;
|
|
13
|
+
export const version = bindings.version;
|
|
14
|
+
export const setMaxDecompressedSize = bindings.setMaxDecompressedSize;
|
|
15
|
+
export { CompressError } from "../../../core/types.js";
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/algorithms/brotli/decompress/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,QAAQ,GAAG,aAAa,CAAC,eAAe,CAC1C,SAAS,CAAC,MAAM,EAChB,QAAQ,EACR,IAAI,GAAG,CAAC,eAAe,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAC5C,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;AAC9C,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AACtE,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC;AAChE,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AACxC,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const compress: (input: Uint8Array, opts?: import("./index.js").CompressOptions) => Promise<Uint8Array>;
|
|
2
|
+
export declare const createCompressStream: (opts?: import("./index.js").CompressOptions) => Promise<import("./index.js").CompressStream>;
|
|
3
|
+
export declare const compressionStream: (opts?: import("./index.js").CompressOptions) => TransformStream<Uint8Array, Uint8Array>;
|
|
4
|
+
export declare const version: () => Promise<string>;
|
|
5
|
+
export { CompressError } from "../../../core/types.js";
|
|
6
|
+
export type { CompressOptions, AlgorithmName } from "../../../core/types.js";
|
|
7
|
+
export type { CompressStream } from "../../../core/dispatch.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/algorithms/bz2/compress/index.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,QAAQ,yFAAoB,CAAC;AAC1C,eAAO,MAAM,oBAAoB,+FAAgC,CAAC;AAClE,eAAO,MAAM,iBAAiB,0FAA6B,CAAC;AAC5D,eAAO,MAAM,OAAO,uBAAmB,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC7E,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* bz2 compress-only subpath. The co-located .wasm is built with the
|
|
3
|
+
* compress-only export set, so the decoder and its codec closure are
|
|
4
|
+
* dead-stripped. Surface is the encode half of `compress-utils/bz2`;
|
|
5
|
+
* for both directions import that instead.
|
|
6
|
+
*/
|
|
7
|
+
import { defineAlgorithm } from "../../../core/algorithm.js";
|
|
8
|
+
import { Algorithm } from "../../../core/types.js";
|
|
9
|
+
const bindings = /*#__PURE__*/ defineAlgorithm(Algorithm.Bz2, "bz2", new URL("./bz2.wasm", import.meta.url));
|
|
10
|
+
export const compress = bindings.compress;
|
|
11
|
+
export const createCompressStream = bindings.createCompressStream;
|
|
12
|
+
export const compressionStream = bindings.compressionStream;
|
|
13
|
+
export const version = bindings.version;
|
|
14
|
+
export { CompressError } from "../../../core/types.js";
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/algorithms/bz2/compress/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,QAAQ,GAAG,aAAa,CAAC,eAAe,CAC1C,SAAS,CAAC,GAAG,EACb,KAAK,EACL,IAAI,GAAG,CAAC,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CACzC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;AAC1C,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,oBAAoB,CAAC;AAClE,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,iBAAiB,CAAC;AAC5D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const decompress: (input: Uint8Array, opts?: import("./index.js").DecompressOptions) => Promise<Uint8Array>;
|
|
2
|
+
export declare const createDecompressStream: () => Promise<import("./index.js").DecompressStream>;
|
|
3
|
+
export declare const decompressionStream: () => TransformStream<Uint8Array, Uint8Array>;
|
|
4
|
+
export declare const version: () => Promise<string>;
|
|
5
|
+
export declare const setMaxDecompressedSize: (bytes: number) => Promise<void>;
|
|
6
|
+
export { CompressError } from "../../../core/types.js";
|
|
7
|
+
export type { DecompressOptions, AlgorithmName } from "../../../core/types.js";
|
|
8
|
+
export type { DecompressStream } from "../../../core/dispatch.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/algorithms/bz2/decompress/index.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,UAAU,2FAAsB,CAAC;AAC9C,eAAO,MAAM,sBAAsB,sDAAkC,CAAC;AACtE,eAAO,MAAM,mBAAmB,+CAA+B,CAAC;AAChE,eAAO,MAAM,OAAO,uBAAmB,CAAC;AACxC,eAAO,MAAM,sBAAsB,kCAAkC,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC/E,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* bz2 decompress-only subpath. The co-located .wasm is built with the
|
|
3
|
+
* decompress-only export set, so the encoder and its codec closure are
|
|
4
|
+
* dead-stripped — a fraction of the full module. Surface is the decode half
|
|
5
|
+
* of `compress-utils/bz2`; for both directions import that instead.
|
|
6
|
+
*/
|
|
7
|
+
import { defineAlgorithm } from "../../../core/algorithm.js";
|
|
8
|
+
import { Algorithm } from "../../../core/types.js";
|
|
9
|
+
const bindings = /*#__PURE__*/ defineAlgorithm(Algorithm.Bz2, "bz2", new URL("./bz2.wasm", import.meta.url));
|
|
10
|
+
export const decompress = bindings.decompress;
|
|
11
|
+
export const createDecompressStream = bindings.createDecompressStream;
|
|
12
|
+
export const decompressionStream = bindings.decompressionStream;
|
|
13
|
+
export const version = bindings.version;
|
|
14
|
+
export const setMaxDecompressedSize = bindings.setMaxDecompressedSize;
|
|
15
|
+
export { CompressError } from "../../../core/types.js";
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/algorithms/bz2/decompress/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,QAAQ,GAAG,aAAa,CAAC,eAAe,CAC1C,SAAS,CAAC,GAAG,EACb,KAAK,EACL,IAAI,GAAG,CAAC,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CACzC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;AAC9C,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AACtE,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC;AAChE,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AACxC,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
Binary file
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const compress: (input: Uint8Array, opts?: import("./index.js").CompressOptions) => Promise<Uint8Array>;
|
|
2
|
+
export declare const createCompressStream: (opts?: import("./index.js").CompressOptions) => Promise<import("./index.js").CompressStream>;
|
|
3
|
+
export declare const compressionStream: (opts?: import("./index.js").CompressOptions) => TransformStream<Uint8Array, Uint8Array>;
|
|
4
|
+
export declare const version: () => Promise<string>;
|
|
5
|
+
export { CompressError } from "../../../core/types.js";
|
|
6
|
+
export type { CompressOptions, AlgorithmName } from "../../../core/types.js";
|
|
7
|
+
export type { CompressStream } from "../../../core/dispatch.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/algorithms/gzip/compress/index.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,QAAQ,yFAAoB,CAAC;AAC1C,eAAO,MAAM,oBAAoB,+FAAgC,CAAC;AAClE,eAAO,MAAM,iBAAiB,0FAA6B,CAAC;AAC5D,eAAO,MAAM,OAAO,uBAAmB,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC7E,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gzip compress-only subpath. The co-located .wasm is built with the
|
|
3
|
+
* compress-only export set, so the decoder and its codec closure are
|
|
4
|
+
* dead-stripped. Surface is the encode half of `compress-utils/gzip`;
|
|
5
|
+
* for both directions import that instead.
|
|
6
|
+
*/
|
|
7
|
+
import { defineAlgorithm } from "../../../core/algorithm.js";
|
|
8
|
+
import { Algorithm } from "../../../core/types.js";
|
|
9
|
+
const bindings = /*#__PURE__*/ defineAlgorithm(Algorithm.Gzip, "gzip", new URL("./gzip.wasm", import.meta.url));
|
|
10
|
+
export const compress = bindings.compress;
|
|
11
|
+
export const createCompressStream = bindings.createCompressStream;
|
|
12
|
+
export const compressionStream = bindings.compressionStream;
|
|
13
|
+
export const version = bindings.version;
|
|
14
|
+
export { CompressError } from "../../../core/types.js";
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/algorithms/gzip/compress/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,QAAQ,GAAG,aAAa,CAAC,eAAe,CAC1C,SAAS,CAAC,IAAI,EACd,MAAM,EACN,IAAI,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAC1C,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;AAC1C,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,oBAAoB,CAAC;AAClE,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,iBAAiB,CAAC;AAC5D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const decompress: (input: Uint8Array, opts?: import("./index.js").DecompressOptions) => Promise<Uint8Array>;
|
|
2
|
+
export declare const createDecompressStream: () => Promise<import("./index.js").DecompressStream>;
|
|
3
|
+
export declare const decompressionStream: () => TransformStream<Uint8Array, Uint8Array>;
|
|
4
|
+
export declare const version: () => Promise<string>;
|
|
5
|
+
export declare const setMaxDecompressedSize: (bytes: number) => Promise<void>;
|
|
6
|
+
export { CompressError } from "../../../core/types.js";
|
|
7
|
+
export type { DecompressOptions, AlgorithmName } from "../../../core/types.js";
|
|
8
|
+
export type { DecompressStream } from "../../../core/dispatch.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/algorithms/gzip/decompress/index.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,UAAU,2FAAsB,CAAC;AAC9C,eAAO,MAAM,sBAAsB,sDAAkC,CAAC;AACtE,eAAO,MAAM,mBAAmB,+CAA+B,CAAC;AAChE,eAAO,MAAM,OAAO,uBAAmB,CAAC;AACxC,eAAO,MAAM,sBAAsB,kCAAkC,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC/E,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gzip decompress-only subpath. The co-located .wasm is built with the
|
|
3
|
+
* decompress-only export set, so the encoder and its codec closure are
|
|
4
|
+
* dead-stripped — a fraction of the full module. Surface is the decode half
|
|
5
|
+
* of `compress-utils/gzip`; for both directions import that instead.
|
|
6
|
+
*/
|
|
7
|
+
import { defineAlgorithm } from "../../../core/algorithm.js";
|
|
8
|
+
import { Algorithm } from "../../../core/types.js";
|
|
9
|
+
const bindings = /*#__PURE__*/ defineAlgorithm(Algorithm.Gzip, "gzip", new URL("./gzip.wasm", import.meta.url));
|
|
10
|
+
export const decompress = bindings.decompress;
|
|
11
|
+
export const createDecompressStream = bindings.createDecompressStream;
|
|
12
|
+
export const decompressionStream = bindings.decompressionStream;
|
|
13
|
+
export const version = bindings.version;
|
|
14
|
+
export const setMaxDecompressedSize = bindings.setMaxDecompressedSize;
|
|
15
|
+
export { CompressError } from "../../../core/types.js";
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/algorithms/gzip/decompress/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,QAAQ,GAAG,aAAa,CAAC,eAAe,CAC1C,SAAS,CAAC,IAAI,EACd,MAAM,EACN,IAAI,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAC1C,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;AAC9C,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AACtE,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC;AAChE,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AACxC,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const compress: (input: Uint8Array, opts?: import("./index.js").CompressOptions) => Promise<Uint8Array>;
|
|
2
|
+
export declare const decompress: (input: Uint8Array, opts?: import("./index.js").DecompressOptions) => Promise<Uint8Array>;
|
|
3
|
+
export declare const createCompressStream: (opts?: import("./index.js").CompressOptions) => Promise<import("./index.js").CompressStream>;
|
|
4
|
+
export declare const createDecompressStream: () => Promise<import("./index.js").DecompressStream>;
|
|
5
|
+
export declare const compressionStream: (opts?: import("./index.js").CompressOptions) => TransformStream<Uint8Array, Uint8Array>;
|
|
6
|
+
export declare const decompressionStream: () => TransformStream<Uint8Array, Uint8Array>;
|
|
7
|
+
export declare const version: () => Promise<string>;
|
|
8
|
+
export declare const setMaxDecompressedSize: (bytes: number) => Promise<void>;
|
|
9
|
+
export { CompressError } from "../../core/types.js";
|
|
10
|
+
export type { CompressOptions, DecompressOptions, AlgorithmName } from "../../core/types.js";
|
|
11
|
+
export type { CompressStream, DecompressStream } from "../../core/dispatch.js";
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/algorithms/gzip/index.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,QAAQ,yFAAoB,CAAC;AAC1C,eAAO,MAAM,UAAU,2FAAsB,CAAC;AAC9C,eAAO,MAAM,oBAAoB,+FAAgC,CAAC;AAClE,eAAO,MAAM,sBAAsB,sDAAkC,CAAC;AACtE,eAAO,MAAM,iBAAiB,0FAA6B,CAAC;AAC5D,eAAO,MAAM,mBAAmB,+CAA+B,CAAC;AAChE,eAAO,MAAM,OAAO,uBAAmB,CAAC;AACxC,eAAO,MAAM,sBAAsB,kCAAkC,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC7F,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gzip subpath. Resolver is selected via the package's `#resolver`
|
|
3
|
+
* subpath import — see ../../core/algorithm.ts and package.json `imports`.
|
|
4
|
+
*/
|
|
5
|
+
import { defineAlgorithm } from "../../core/algorithm.js";
|
|
6
|
+
import { Algorithm } from "../../core/types.js";
|
|
7
|
+
const bindings = /*#__PURE__*/ defineAlgorithm(Algorithm.Gzip, "gzip", new URL("./gzip.wasm", import.meta.url));
|
|
8
|
+
export const compress = bindings.compress;
|
|
9
|
+
export const decompress = bindings.decompress;
|
|
10
|
+
export const createCompressStream = bindings.createCompressStream;
|
|
11
|
+
export const createDecompressStream = bindings.createDecompressStream;
|
|
12
|
+
export const compressionStream = bindings.compressionStream;
|
|
13
|
+
export const decompressionStream = bindings.decompressionStream;
|
|
14
|
+
export const version = bindings.version;
|
|
15
|
+
export const setMaxDecompressedSize = bindings.setMaxDecompressedSize;
|
|
16
|
+
export { CompressError } from "../../core/types.js";
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/algorithms/gzip/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,MAAM,QAAQ,GAAG,aAAa,CAAC,eAAe,CAC1C,SAAS,CAAC,IAAI,EACd,MAAM,EACN,IAAI,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAC1C,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;AAC1C,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;AAC9C,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,oBAAoB,CAAC;AAClE,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AACtE,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,iBAAiB,CAAC;AAC5D,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC;AAChE,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AACxC,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const compress: (input: Uint8Array, opts?: import("./index.js").CompressOptions) => Promise<Uint8Array>;
|
|
2
|
+
export declare const createCompressStream: (opts?: import("./index.js").CompressOptions) => Promise<import("./index.js").CompressStream>;
|
|
3
|
+
export declare const compressionStream: (opts?: import("./index.js").CompressOptions) => TransformStream<Uint8Array, Uint8Array>;
|
|
4
|
+
export declare const version: () => Promise<string>;
|
|
5
|
+
export { CompressError } from "../../../core/types.js";
|
|
6
|
+
export type { CompressOptions, AlgorithmName } from "../../../core/types.js";
|
|
7
|
+
export type { CompressStream } from "../../../core/dispatch.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/algorithms/lz4/compress/index.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,QAAQ,yFAAoB,CAAC;AAC1C,eAAO,MAAM,oBAAoB,+FAAgC,CAAC;AAClE,eAAO,MAAM,iBAAiB,0FAA6B,CAAC;AAC5D,eAAO,MAAM,OAAO,uBAAmB,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC7E,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lz4 compress-only subpath. The co-located .wasm is built with the
|
|
3
|
+
* compress-only export set, so the decoder and its codec closure are
|
|
4
|
+
* dead-stripped. Surface is the encode half of `compress-utils/lz4`;
|
|
5
|
+
* for both directions import that instead.
|
|
6
|
+
*/
|
|
7
|
+
import { defineAlgorithm } from "../../../core/algorithm.js";
|
|
8
|
+
import { Algorithm } from "../../../core/types.js";
|
|
9
|
+
const bindings = /*#__PURE__*/ defineAlgorithm(Algorithm.Lz4, "lz4", new URL("./lz4.wasm", import.meta.url));
|
|
10
|
+
export const compress = bindings.compress;
|
|
11
|
+
export const createCompressStream = bindings.createCompressStream;
|
|
12
|
+
export const compressionStream = bindings.compressionStream;
|
|
13
|
+
export const version = bindings.version;
|
|
14
|
+
export { CompressError } from "../../../core/types.js";
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/algorithms/lz4/compress/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,QAAQ,GAAG,aAAa,CAAC,eAAe,CAC1C,SAAS,CAAC,GAAG,EACb,KAAK,EACL,IAAI,GAAG,CAAC,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CACzC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;AAC1C,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,oBAAoB,CAAC;AAClE,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,iBAAiB,CAAC;AAC5D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const decompress: (input: Uint8Array, opts?: import("./index.js").DecompressOptions) => Promise<Uint8Array>;
|
|
2
|
+
export declare const createDecompressStream: () => Promise<import("./index.js").DecompressStream>;
|
|
3
|
+
export declare const decompressionStream: () => TransformStream<Uint8Array, Uint8Array>;
|
|
4
|
+
export declare const version: () => Promise<string>;
|
|
5
|
+
export declare const setMaxDecompressedSize: (bytes: number) => Promise<void>;
|
|
6
|
+
export { CompressError } from "../../../core/types.js";
|
|
7
|
+
export type { DecompressOptions, AlgorithmName } from "../../../core/types.js";
|
|
8
|
+
export type { DecompressStream } from "../../../core/dispatch.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/algorithms/lz4/decompress/index.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,UAAU,2FAAsB,CAAC;AAC9C,eAAO,MAAM,sBAAsB,sDAAkC,CAAC;AACtE,eAAO,MAAM,mBAAmB,+CAA+B,CAAC;AAChE,eAAO,MAAM,OAAO,uBAAmB,CAAC;AACxC,eAAO,MAAM,sBAAsB,kCAAkC,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC/E,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lz4 decompress-only subpath. The co-located .wasm is built with the
|
|
3
|
+
* decompress-only export set, so the encoder and its codec closure are
|
|
4
|
+
* dead-stripped — a fraction of the full module. Surface is the decode half
|
|
5
|
+
* of `compress-utils/lz4`; for both directions import that instead.
|
|
6
|
+
*/
|
|
7
|
+
import { defineAlgorithm } from "../../../core/algorithm.js";
|
|
8
|
+
import { Algorithm } from "../../../core/types.js";
|
|
9
|
+
const bindings = /*#__PURE__*/ defineAlgorithm(Algorithm.Lz4, "lz4", new URL("./lz4.wasm", import.meta.url));
|
|
10
|
+
export const decompress = bindings.decompress;
|
|
11
|
+
export const createDecompressStream = bindings.createDecompressStream;
|
|
12
|
+
export const decompressionStream = bindings.decompressionStream;
|
|
13
|
+
export const version = bindings.version;
|
|
14
|
+
export const setMaxDecompressedSize = bindings.setMaxDecompressedSize;
|
|
15
|
+
export { CompressError } from "../../../core/types.js";
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/algorithms/lz4/decompress/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,QAAQ,GAAG,aAAa,CAAC,eAAe,CAC1C,SAAS,CAAC,GAAG,EACb,KAAK,EACL,IAAI,GAAG,CAAC,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CACzC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;AAC9C,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AACtE,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC;AAChE,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AACxC,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const compress: (input: Uint8Array, opts?: import("./index.js").CompressOptions) => Promise<Uint8Array>;
|
|
2
|
+
export declare const createCompressStream: (opts?: import("./index.js").CompressOptions) => Promise<import("./index.js").CompressStream>;
|
|
3
|
+
export declare const compressionStream: (opts?: import("./index.js").CompressOptions) => TransformStream<Uint8Array, Uint8Array>;
|
|
4
|
+
export declare const version: () => Promise<string>;
|
|
5
|
+
export { CompressError } from "../../../core/types.js";
|
|
6
|
+
export type { CompressOptions, AlgorithmName } from "../../../core/types.js";
|
|
7
|
+
export type { CompressStream } from "../../../core/dispatch.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/algorithms/snappy/compress/index.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,QAAQ,yFAAoB,CAAC;AAC1C,eAAO,MAAM,oBAAoB,+FAAgC,CAAC;AAClE,eAAO,MAAM,iBAAiB,0FAA6B,CAAC;AAC5D,eAAO,MAAM,OAAO,uBAAmB,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC7E,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* snappy compress-only subpath. The co-located .wasm is built with the
|
|
3
|
+
* compress-only export set, so the decoder and its codec closure are
|
|
4
|
+
* dead-stripped. Surface is the encode half of `compress-utils/snappy`;
|
|
5
|
+
* for both directions import that instead.
|
|
6
|
+
*/
|
|
7
|
+
import { defineAlgorithm } from "../../../core/algorithm.js";
|
|
8
|
+
import { Algorithm } from "../../../core/types.js";
|
|
9
|
+
const bindings = /*#__PURE__*/ defineAlgorithm(Algorithm.Snappy, "snappy", new URL("./snappy.wasm", import.meta.url));
|
|
10
|
+
export const compress = bindings.compress;
|
|
11
|
+
export const createCompressStream = bindings.createCompressStream;
|
|
12
|
+
export const compressionStream = bindings.compressionStream;
|
|
13
|
+
export const version = bindings.version;
|
|
14
|
+
export { CompressError } from "../../../core/types.js";
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/algorithms/snappy/compress/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,QAAQ,GAAG,aAAa,CAAC,eAAe,CAC1C,SAAS,CAAC,MAAM,EAChB,QAAQ,EACR,IAAI,GAAG,CAAC,eAAe,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAC5C,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;AAC1C,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,oBAAoB,CAAC;AAClE,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,iBAAiB,CAAC;AAC5D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const decompress: (input: Uint8Array, opts?: import("./index.js").DecompressOptions) => Promise<Uint8Array>;
|
|
2
|
+
export declare const createDecompressStream: () => Promise<import("./index.js").DecompressStream>;
|
|
3
|
+
export declare const decompressionStream: () => TransformStream<Uint8Array, Uint8Array>;
|
|
4
|
+
export declare const version: () => Promise<string>;
|
|
5
|
+
export declare const setMaxDecompressedSize: (bytes: number) => Promise<void>;
|
|
6
|
+
export { CompressError } from "../../../core/types.js";
|
|
7
|
+
export type { DecompressOptions, AlgorithmName } from "../../../core/types.js";
|
|
8
|
+
export type { DecompressStream } from "../../../core/dispatch.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/algorithms/snappy/decompress/index.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,UAAU,2FAAsB,CAAC;AAC9C,eAAO,MAAM,sBAAsB,sDAAkC,CAAC;AACtE,eAAO,MAAM,mBAAmB,+CAA+B,CAAC;AAChE,eAAO,MAAM,OAAO,uBAAmB,CAAC;AACxC,eAAO,MAAM,sBAAsB,kCAAkC,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC/E,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* snappy decompress-only subpath. The co-located .wasm is built with the
|
|
3
|
+
* decompress-only export set, so the encoder and its codec closure are
|
|
4
|
+
* dead-stripped — a fraction of the full module. Surface is the decode half
|
|
5
|
+
* of `compress-utils/snappy`; for both directions import that instead.
|
|
6
|
+
*/
|
|
7
|
+
import { defineAlgorithm } from "../../../core/algorithm.js";
|
|
8
|
+
import { Algorithm } from "../../../core/types.js";
|
|
9
|
+
const bindings = /*#__PURE__*/ defineAlgorithm(Algorithm.Snappy, "snappy", new URL("./snappy.wasm", import.meta.url));
|
|
10
|
+
export const decompress = bindings.decompress;
|
|
11
|
+
export const createDecompressStream = bindings.createDecompressStream;
|
|
12
|
+
export const decompressionStream = bindings.decompressionStream;
|
|
13
|
+
export const version = bindings.version;
|
|
14
|
+
export const setMaxDecompressedSize = bindings.setMaxDecompressedSize;
|
|
15
|
+
export { CompressError } from "../../../core/types.js";
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/algorithms/snappy/decompress/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,QAAQ,GAAG,aAAa,CAAC,eAAe,CAC1C,SAAS,CAAC,MAAM,EAChB,QAAQ,EACR,IAAI,GAAG,CAAC,eAAe,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAC5C,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;AAC9C,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AACtE,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC;AAChE,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AACxC,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const compress: (input: Uint8Array, opts?: import("./index.js").CompressOptions) => Promise<Uint8Array>;
|
|
2
|
+
export declare const decompress: (input: Uint8Array, opts?: import("./index.js").DecompressOptions) => Promise<Uint8Array>;
|
|
3
|
+
export declare const createCompressStream: (opts?: import("./index.js").CompressOptions) => Promise<import("./index.js").CompressStream>;
|
|
4
|
+
export declare const createDecompressStream: () => Promise<import("./index.js").DecompressStream>;
|
|
5
|
+
export declare const compressionStream: (opts?: import("./index.js").CompressOptions) => TransformStream<Uint8Array, Uint8Array>;
|
|
6
|
+
export declare const decompressionStream: () => TransformStream<Uint8Array, Uint8Array>;
|
|
7
|
+
export declare const version: () => Promise<string>;
|
|
8
|
+
export declare const setMaxDecompressedSize: (bytes: number) => Promise<void>;
|
|
9
|
+
export { CompressError } from "../../core/types.js";
|
|
10
|
+
export type { CompressOptions, DecompressOptions, AlgorithmName } from "../../core/types.js";
|
|
11
|
+
export type { CompressStream, DecompressStream } from "../../core/dispatch.js";
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/algorithms/snappy/index.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,QAAQ,yFAAoB,CAAC;AAC1C,eAAO,MAAM,UAAU,2FAAsB,CAAC;AAC9C,eAAO,MAAM,oBAAoB,+FAAgC,CAAC;AAClE,eAAO,MAAM,sBAAsB,sDAAkC,CAAC;AACtE,eAAO,MAAM,iBAAiB,0FAA6B,CAAC;AAC5D,eAAO,MAAM,mBAAmB,+CAA+B,CAAC;AAChE,eAAO,MAAM,OAAO,uBAAmB,CAAC;AACxC,eAAO,MAAM,sBAAsB,kCAAkC,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC7F,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* snappy subpath. Resolver is selected via the package's `#resolver`
|
|
3
|
+
* subpath import — see ../../core/algorithm.ts and package.json `imports`.
|
|
4
|
+
*/
|
|
5
|
+
import { defineAlgorithm } from "../../core/algorithm.js";
|
|
6
|
+
import { Algorithm } from "../../core/types.js";
|
|
7
|
+
const bindings = /*#__PURE__*/ defineAlgorithm(Algorithm.Snappy, "snappy", new URL("./snappy.wasm", import.meta.url));
|
|
8
|
+
export const compress = bindings.compress;
|
|
9
|
+
export const decompress = bindings.decompress;
|
|
10
|
+
export const createCompressStream = bindings.createCompressStream;
|
|
11
|
+
export const createDecompressStream = bindings.createDecompressStream;
|
|
12
|
+
export const compressionStream = bindings.compressionStream;
|
|
13
|
+
export const decompressionStream = bindings.decompressionStream;
|
|
14
|
+
export const version = bindings.version;
|
|
15
|
+
export const setMaxDecompressedSize = bindings.setMaxDecompressedSize;
|
|
16
|
+
export { CompressError } from "../../core/types.js";
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/algorithms/snappy/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,MAAM,QAAQ,GAAG,aAAa,CAAC,eAAe,CAC1C,SAAS,CAAC,MAAM,EAChB,QAAQ,EACR,IAAI,GAAG,CAAC,eAAe,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAC5C,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;AAC1C,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;AAC9C,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,oBAAoB,CAAC;AAClE,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AACtE,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,iBAAiB,CAAC;AAC5D,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC;AAChE,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AACxC,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC"}
|
|
Binary file
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const compress: (input: Uint8Array, opts?: import("./index.js").CompressOptions) => Promise<Uint8Array>;
|
|
2
|
+
export declare const createCompressStream: (opts?: import("./index.js").CompressOptions) => Promise<import("./index.js").CompressStream>;
|
|
3
|
+
export declare const compressionStream: (opts?: import("./index.js").CompressOptions) => TransformStream<Uint8Array, Uint8Array>;
|
|
4
|
+
export declare const version: () => Promise<string>;
|
|
5
|
+
export { CompressError } from "../../../core/types.js";
|
|
6
|
+
export type { CompressOptions, AlgorithmName } from "../../../core/types.js";
|
|
7
|
+
export type { CompressStream } from "../../../core/dispatch.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/algorithms/xz/compress/index.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,QAAQ,yFAAoB,CAAC;AAC1C,eAAO,MAAM,oBAAoB,+FAAgC,CAAC;AAClE,eAAO,MAAM,iBAAiB,0FAA6B,CAAC;AAC5D,eAAO,MAAM,OAAO,uBAAmB,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC7E,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* xz compress-only subpath. The co-located .wasm is built with the
|
|
3
|
+
* compress-only export set, so the decoder and its codec closure are
|
|
4
|
+
* dead-stripped. Surface is the encode half of `compress-utils/xz`;
|
|
5
|
+
* for both directions import that instead.
|
|
6
|
+
*/
|
|
7
|
+
import { defineAlgorithm } from "../../../core/algorithm.js";
|
|
8
|
+
import { Algorithm } from "../../../core/types.js";
|
|
9
|
+
const bindings = /*#__PURE__*/ defineAlgorithm(Algorithm.Xz, "xz", new URL("./xz.wasm", import.meta.url));
|
|
10
|
+
export const compress = bindings.compress;
|
|
11
|
+
export const createCompressStream = bindings.createCompressStream;
|
|
12
|
+
export const compressionStream = bindings.compressionStream;
|
|
13
|
+
export const version = bindings.version;
|
|
14
|
+
export { CompressError } from "../../../core/types.js";
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/algorithms/xz/compress/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,QAAQ,GAAG,aAAa,CAAC,eAAe,CAC1C,SAAS,CAAC,EAAE,EACZ,IAAI,EACJ,IAAI,GAAG,CAAC,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CACxC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;AAC1C,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,oBAAoB,CAAC;AAClE,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,iBAAiB,CAAC;AAC5D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const decompress: (input: Uint8Array, opts?: import("./index.js").DecompressOptions) => Promise<Uint8Array>;
|
|
2
|
+
export declare const createDecompressStream: () => Promise<import("./index.js").DecompressStream>;
|
|
3
|
+
export declare const decompressionStream: () => TransformStream<Uint8Array, Uint8Array>;
|
|
4
|
+
export declare const version: () => Promise<string>;
|
|
5
|
+
export declare const setMaxDecompressedSize: (bytes: number) => Promise<void>;
|
|
6
|
+
export { CompressError } from "../../../core/types.js";
|
|
7
|
+
export type { DecompressOptions, AlgorithmName } from "../../../core/types.js";
|
|
8
|
+
export type { DecompressStream } from "../../../core/dispatch.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/algorithms/xz/decompress/index.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,UAAU,2FAAsB,CAAC;AAC9C,eAAO,MAAM,sBAAsB,sDAAkC,CAAC;AACtE,eAAO,MAAM,mBAAmB,+CAA+B,CAAC;AAChE,eAAO,MAAM,OAAO,uBAAmB,CAAC;AACxC,eAAO,MAAM,sBAAsB,kCAAkC,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC/E,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* xz decompress-only subpath. The co-located .wasm is built with the
|
|
3
|
+
* decompress-only export set, so the encoder and its codec closure are
|
|
4
|
+
* dead-stripped — a fraction of the full module. Surface is the decode half
|
|
5
|
+
* of `compress-utils/xz`; for both directions import that instead.
|
|
6
|
+
*/
|
|
7
|
+
import { defineAlgorithm } from "../../../core/algorithm.js";
|
|
8
|
+
import { Algorithm } from "../../../core/types.js";
|
|
9
|
+
const bindings = /*#__PURE__*/ defineAlgorithm(Algorithm.Xz, "xz", new URL("./xz.wasm", import.meta.url));
|
|
10
|
+
export const decompress = bindings.decompress;
|
|
11
|
+
export const createDecompressStream = bindings.createDecompressStream;
|
|
12
|
+
export const decompressionStream = bindings.decompressionStream;
|
|
13
|
+
export const version = bindings.version;
|
|
14
|
+
export const setMaxDecompressedSize = bindings.setMaxDecompressedSize;
|
|
15
|
+
export { CompressError } from "../../../core/types.js";
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/algorithms/xz/decompress/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,QAAQ,GAAG,aAAa,CAAC,eAAe,CAC1C,SAAS,CAAC,EAAE,EACZ,IAAI,EACJ,IAAI,GAAG,CAAC,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CACxC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;AAC9C,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AACtE,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC;AAChE,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AACxC,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const compress: (input: Uint8Array, opts?: import("./index.js").CompressOptions) => Promise<Uint8Array>;
|
|
2
|
+
export declare const createCompressStream: (opts?: import("./index.js").CompressOptions) => Promise<import("./index.js").CompressStream>;
|
|
3
|
+
export declare const compressionStream: (opts?: import("./index.js").CompressOptions) => TransformStream<Uint8Array, Uint8Array>;
|
|
4
|
+
export declare const version: () => Promise<string>;
|
|
5
|
+
export { CompressError } from "../../../core/types.js";
|
|
6
|
+
export type { CompressOptions, AlgorithmName } from "../../../core/types.js";
|
|
7
|
+
export type { CompressStream } from "../../../core/dispatch.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/algorithms/zlib/compress/index.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,QAAQ,yFAAoB,CAAC;AAC1C,eAAO,MAAM,oBAAoB,+FAAgC,CAAC;AAClE,eAAO,MAAM,iBAAiB,0FAA6B,CAAC;AAC5D,eAAO,MAAM,OAAO,uBAAmB,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC7E,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* zlib compress-only subpath. The co-located .wasm is built with the
|
|
3
|
+
* compress-only export set, so the decoder and its codec closure are
|
|
4
|
+
* dead-stripped. Surface is the encode half of `compress-utils/zlib`;
|
|
5
|
+
* for both directions import that instead.
|
|
6
|
+
*/
|
|
7
|
+
import { defineAlgorithm } from "../../../core/algorithm.js";
|
|
8
|
+
import { Algorithm } from "../../../core/types.js";
|
|
9
|
+
const bindings = /*#__PURE__*/ defineAlgorithm(Algorithm.Zlib, "zlib", new URL("./zlib.wasm", import.meta.url));
|
|
10
|
+
export const compress = bindings.compress;
|
|
11
|
+
export const createCompressStream = bindings.createCompressStream;
|
|
12
|
+
export const compressionStream = bindings.compressionStream;
|
|
13
|
+
export const version = bindings.version;
|
|
14
|
+
export { CompressError } from "../../../core/types.js";
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/algorithms/zlib/compress/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,QAAQ,GAAG,aAAa,CAAC,eAAe,CAC1C,SAAS,CAAC,IAAI,EACd,MAAM,EACN,IAAI,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAC1C,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;AAC1C,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,oBAAoB,CAAC;AAClE,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,iBAAiB,CAAC;AAC5D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const decompress: (input: Uint8Array, opts?: import("./index.js").DecompressOptions) => Promise<Uint8Array>;
|
|
2
|
+
export declare const createDecompressStream: () => Promise<import("./index.js").DecompressStream>;
|
|
3
|
+
export declare const decompressionStream: () => TransformStream<Uint8Array, Uint8Array>;
|
|
4
|
+
export declare const version: () => Promise<string>;
|
|
5
|
+
export declare const setMaxDecompressedSize: (bytes: number) => Promise<void>;
|
|
6
|
+
export { CompressError } from "../../../core/types.js";
|
|
7
|
+
export type { DecompressOptions, AlgorithmName } from "../../../core/types.js";
|
|
8
|
+
export type { DecompressStream } from "../../../core/dispatch.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/algorithms/zlib/decompress/index.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,UAAU,2FAAsB,CAAC;AAC9C,eAAO,MAAM,sBAAsB,sDAAkC,CAAC;AACtE,eAAO,MAAM,mBAAmB,+CAA+B,CAAC;AAChE,eAAO,MAAM,OAAO,uBAAmB,CAAC;AACxC,eAAO,MAAM,sBAAsB,kCAAkC,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC/E,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* zlib decompress-only subpath. The co-located .wasm is built with the
|
|
3
|
+
* decompress-only export set, so the encoder and its codec closure are
|
|
4
|
+
* dead-stripped — a fraction of the full module. Surface is the decode half
|
|
5
|
+
* of `compress-utils/zlib`; for both directions import that instead.
|
|
6
|
+
*/
|
|
7
|
+
import { defineAlgorithm } from "../../../core/algorithm.js";
|
|
8
|
+
import { Algorithm } from "../../../core/types.js";
|
|
9
|
+
const bindings = /*#__PURE__*/ defineAlgorithm(Algorithm.Zlib, "zlib", new URL("./zlib.wasm", import.meta.url));
|
|
10
|
+
export const decompress = bindings.decompress;
|
|
11
|
+
export const createDecompressStream = bindings.createDecompressStream;
|
|
12
|
+
export const decompressionStream = bindings.decompressionStream;
|
|
13
|
+
export const version = bindings.version;
|
|
14
|
+
export const setMaxDecompressedSize = bindings.setMaxDecompressedSize;
|
|
15
|
+
export { CompressError } from "../../../core/types.js";
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/algorithms/zlib/decompress/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,QAAQ,GAAG,aAAa,CAAC,eAAe,CAC1C,SAAS,CAAC,IAAI,EACd,MAAM,EACN,IAAI,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAC1C,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;AAC9C,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AACtE,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC;AAChE,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AACxC,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const compress: (input: Uint8Array, opts?: import("./index.js").CompressOptions) => Promise<Uint8Array>;
|
|
2
|
+
export declare const createCompressStream: (opts?: import("./index.js").CompressOptions) => Promise<import("./index.js").CompressStream>;
|
|
3
|
+
export declare const compressionStream: (opts?: import("./index.js").CompressOptions) => TransformStream<Uint8Array, Uint8Array>;
|
|
4
|
+
export declare const version: () => Promise<string>;
|
|
5
|
+
export { CompressError } from "../../../core/types.js";
|
|
6
|
+
export type { CompressOptions, AlgorithmName } from "../../../core/types.js";
|
|
7
|
+
export type { CompressStream } from "../../../core/dispatch.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/algorithms/zstd/compress/index.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,QAAQ,yFAAoB,CAAC;AAC1C,eAAO,MAAM,oBAAoB,+FAAgC,CAAC;AAClE,eAAO,MAAM,iBAAiB,0FAA6B,CAAC;AAC5D,eAAO,MAAM,OAAO,uBAAmB,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC7E,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* zstd compress-only subpath. The co-located .wasm is built with the
|
|
3
|
+
* compress-only export set, so the decoder and its codec closure are
|
|
4
|
+
* dead-stripped. Surface is the encode half of `compress-utils/zstd`;
|
|
5
|
+
* for both directions import that instead.
|
|
6
|
+
*/
|
|
7
|
+
import { defineAlgorithm } from "../../../core/algorithm.js";
|
|
8
|
+
import { Algorithm } from "../../../core/types.js";
|
|
9
|
+
const bindings = /*#__PURE__*/ defineAlgorithm(Algorithm.Zstd, "zstd", new URL("./zstd.wasm", import.meta.url));
|
|
10
|
+
export const compress = bindings.compress;
|
|
11
|
+
export const createCompressStream = bindings.createCompressStream;
|
|
12
|
+
export const compressionStream = bindings.compressionStream;
|
|
13
|
+
export const version = bindings.version;
|
|
14
|
+
export { CompressError } from "../../../core/types.js";
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/algorithms/zstd/compress/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,QAAQ,GAAG,aAAa,CAAC,eAAe,CAC1C,SAAS,CAAC,IAAI,EACd,MAAM,EACN,IAAI,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAC1C,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;AAC1C,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,oBAAoB,CAAC;AAClE,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,iBAAiB,CAAC;AAC5D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const decompress: (input: Uint8Array, opts?: import("./index.js").DecompressOptions) => Promise<Uint8Array>;
|
|
2
|
+
export declare const createDecompressStream: () => Promise<import("./index.js").DecompressStream>;
|
|
3
|
+
export declare const decompressionStream: () => TransformStream<Uint8Array, Uint8Array>;
|
|
4
|
+
export declare const version: () => Promise<string>;
|
|
5
|
+
export declare const setMaxDecompressedSize: (bytes: number) => Promise<void>;
|
|
6
|
+
export { CompressError } from "../../../core/types.js";
|
|
7
|
+
export type { DecompressOptions, AlgorithmName } from "../../../core/types.js";
|
|
8
|
+
export type { DecompressStream } from "../../../core/dispatch.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/algorithms/zstd/decompress/index.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,UAAU,2FAAsB,CAAC;AAC9C,eAAO,MAAM,sBAAsB,sDAAkC,CAAC;AACtE,eAAO,MAAM,mBAAmB,+CAA+B,CAAC;AAChE,eAAO,MAAM,OAAO,uBAAmB,CAAC;AACxC,eAAO,MAAM,sBAAsB,kCAAkC,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC/E,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* zstd decompress-only subpath. The co-located .wasm is built with the
|
|
3
|
+
* decompress-only export set, so the encoder and its codec closure are
|
|
4
|
+
* dead-stripped — a fraction of the full module. Surface is the decode half
|
|
5
|
+
* of `compress-utils/zstd`; for both directions import that instead.
|
|
6
|
+
*/
|
|
7
|
+
import { defineAlgorithm } from "../../../core/algorithm.js";
|
|
8
|
+
import { Algorithm } from "../../../core/types.js";
|
|
9
|
+
const bindings = /*#__PURE__*/ defineAlgorithm(Algorithm.Zstd, "zstd", new URL("./zstd.wasm", import.meta.url));
|
|
10
|
+
export const decompress = bindings.decompress;
|
|
11
|
+
export const createDecompressStream = bindings.createDecompressStream;
|
|
12
|
+
export const decompressionStream = bindings.decompressionStream;
|
|
13
|
+
export const version = bindings.version;
|
|
14
|
+
export const setMaxDecompressedSize = bindings.setMaxDecompressedSize;
|
|
15
|
+
export { CompressError } from "../../../core/types.js";
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/algorithms/zstd/decompress/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,QAAQ,GAAG,aAAa,CAAC,eAAe,CAC1C,SAAS,CAAC,IAAI,EACd,MAAM,EACN,IAAI,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAC1C,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;AAC9C,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AACtE,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC;AAChE,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AACxC,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
Binary file
|
|
Binary file
|
package/dist/core/types.d.ts
CHANGED
|
@@ -11,7 +11,9 @@ export declare const enum Algorithm {
|
|
|
11
11
|
Bz2 = 3,
|
|
12
12
|
Lz4 = 4,
|
|
13
13
|
Xz = 5,
|
|
14
|
-
Lzma = 6
|
|
14
|
+
Lzma = 6,
|
|
15
|
+
Snappy = 7,
|
|
16
|
+
Gzip = 8
|
|
15
17
|
}
|
|
16
18
|
/** @internal */
|
|
17
19
|
export declare const enum Status {
|
|
@@ -31,7 +33,7 @@ export declare const enum Status {
|
|
|
31
33
|
Internal = 13
|
|
32
34
|
}
|
|
33
35
|
/** Canonical lower-case algorithm names. */
|
|
34
|
-
export type AlgorithmName = "zstd" | "brotli" | "zlib" | "bz2" | "lz4" | "xz";
|
|
36
|
+
export type AlgorithmName = "zstd" | "brotli" | "zlib" | "bz2" | "lz4" | "xz" | "snappy" | "gzip";
|
|
35
37
|
/** Thrown for any non-Ok status. Carries the raw status code and algo name. */
|
|
36
38
|
export declare class CompressError extends Error {
|
|
37
39
|
/** Underlying C status code. Stable across versions; see compress_utils.h. */
|
package/dist/core/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,gBAAgB;AAChB,0BAAkB,SAAS;IACvB,IAAI,IAAI;IACR,MAAM,IAAI;IACV,IAAI,IAAI;IACR,GAAG,IAAI;IACP,GAAG,IAAI;IACP,EAAE,IAAI;IACN,IAAI,IAAI;CACX;AAED,gBAAgB;AAChB,0BAAkB,MAAM;IACpB,EAAE,IAAI;IACN,UAAU,IAAI;IACd,YAAY,IAAI;IAChB,WAAW,IAAI;IACf,WAAW,IAAI;IACf,eAAe,IAAI;IACnB,WAAW,IAAI;IACf,aAAa,IAAI;IACjB,SAAS,IAAI;IACb,SAAS,IAAI;IACb,cAAc,KAAK;IACnB,WAAW,KAAK;IAChB,GAAG,KAAK;IACR,QAAQ,KAAK;CAChB;AAED,4CAA4C;AAC5C,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,gBAAgB;AAChB,0BAAkB,SAAS;IACvB,IAAI,IAAI;IACR,MAAM,IAAI;IACV,IAAI,IAAI;IACR,GAAG,IAAI;IACP,GAAG,IAAI;IACP,EAAE,IAAI;IACN,IAAI,IAAI;IACR,MAAM,IAAI;IACV,IAAI,IAAI;CACX;AAED,gBAAgB;AAChB,0BAAkB,MAAM;IACpB,EAAE,IAAI;IACN,UAAU,IAAI;IACd,YAAY,IAAI;IAChB,WAAW,IAAI;IACf,WAAW,IAAI;IACf,eAAe,IAAI;IACnB,WAAW,IAAI;IACf,aAAa,IAAI;IACjB,SAAS,IAAI;IACb,SAAS,IAAI;IACb,cAAc,KAAK;IACnB,WAAW,KAAK;IAChB,GAAG,KAAK;IACR,QAAQ,KAAK;CAChB;AAED,4CAA4C;AAC5C,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,QAAQ,GAAG,MAAM,CAAC;AAElG,+EAA+E;AAC/E,qBAAa,aAAc,SAAQ,KAAK;IACpC,8EAA8E;IAC9E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;gBAEtB,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM;CAMtE;AAED,MAAM,WAAW,eAAe;IAC5B,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAC9B;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB"}
|
package/dist/core/types.js
CHANGED
|
@@ -13,6 +13,8 @@ export var Algorithm;
|
|
|
13
13
|
Algorithm[Algorithm["Lz4"] = 4] = "Lz4";
|
|
14
14
|
Algorithm[Algorithm["Xz"] = 5] = "Xz";
|
|
15
15
|
Algorithm[Algorithm["Lzma"] = 6] = "Lzma";
|
|
16
|
+
Algorithm[Algorithm["Snappy"] = 7] = "Snappy";
|
|
17
|
+
Algorithm[Algorithm["Gzip"] = 8] = "Gzip";
|
|
16
18
|
})(Algorithm || (Algorithm = {}));
|
|
17
19
|
/** @internal */
|
|
18
20
|
export var Status;
|
package/dist/core/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,gBAAgB;AAChB,MAAM,CAAN,IAAkB,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,gBAAgB;AAChB,MAAM,CAAN,IAAkB,SAUjB;AAVD,WAAkB,SAAS;IACvB,yCAAQ,CAAA;IACR,6CAAU,CAAA;IACV,yCAAQ,CAAA;IACR,uCAAO,CAAA;IACP,uCAAO,CAAA;IACP,qCAAM,CAAA;IACN,yCAAQ,CAAA;IACR,6CAAU,CAAA;IACV,yCAAQ,CAAA;AACZ,CAAC,EAViB,SAAS,KAAT,SAAS,QAU1B;AAED,gBAAgB;AAChB,MAAM,CAAN,IAAkB,MAejB;AAfD,WAAkB,MAAM;IACpB,+BAAM,CAAA;IACN,+CAAc,CAAA;IACd,mDAAgB,CAAA;IAChB,iDAAe,CAAA;IACf,iDAAe,CAAA;IACf,yDAAmB,CAAA;IACnB,iDAAe,CAAA;IACf,qDAAiB,CAAA;IACjB,6CAAa,CAAA;IACb,6CAAa,CAAA;IACb,wDAAmB,CAAA;IACnB,kDAAgB,CAAA;IAChB,kCAAQ,CAAA;IACR,4CAAa,CAAA;AACjB,CAAC,EAfiB,MAAM,KAAN,MAAM,QAevB;AAKD,+EAA+E;AAC/E,MAAM,OAAO,aAAc,SAAQ,KAAK;IACpC,8EAA8E;IACrE,IAAI,CAAS;IACb,SAAS,CAAgB;IAElC,YAAY,IAAY,EAAE,SAAwB,EAAE,OAAe;QAC/D,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;CACJ"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "compress-utils",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "WASM compression bindings for zstd, brotli, zlib, bz2, lz4, xz
|
|
3
|
+
"version": "0.8.0",
|
|
4
|
+
"description": "WASM compression bindings for zstd, brotli, zlib, bz2, lz4, xz, snappy, gzip - all tree-shakeable.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"repository": {
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"bzip2",
|
|
28
28
|
"lz4",
|
|
29
29
|
"xz",
|
|
30
|
-
"lzma"
|
|
30
|
+
"lzma",
|
|
31
|
+
"snappy"
|
|
31
32
|
],
|
|
32
33
|
"publishConfig": {
|
|
33
34
|
"access": "public",
|
|
@@ -35,11 +36,29 @@
|
|
|
35
36
|
},
|
|
36
37
|
"exports": {
|
|
37
38
|
"./zstd": "./dist/algorithms/zstd/index.js",
|
|
39
|
+
"./zstd/decompress": "./dist/algorithms/zstd/decompress/index.js",
|
|
40
|
+
"./zstd/compress": "./dist/algorithms/zstd/compress/index.js",
|
|
38
41
|
"./brotli": "./dist/algorithms/brotli/index.js",
|
|
42
|
+
"./brotli/decompress": "./dist/algorithms/brotli/decompress/index.js",
|
|
43
|
+
"./brotli/compress": "./dist/algorithms/brotli/compress/index.js",
|
|
39
44
|
"./zlib": "./dist/algorithms/zlib/index.js",
|
|
45
|
+
"./zlib/decompress": "./dist/algorithms/zlib/decompress/index.js",
|
|
46
|
+
"./zlib/compress": "./dist/algorithms/zlib/compress/index.js",
|
|
40
47
|
"./bz2": "./dist/algorithms/bz2/index.js",
|
|
48
|
+
"./bz2/decompress": "./dist/algorithms/bz2/decompress/index.js",
|
|
49
|
+
"./bz2/compress": "./dist/algorithms/bz2/compress/index.js",
|
|
41
50
|
"./lz4": "./dist/algorithms/lz4/index.js",
|
|
42
|
-
"./
|
|
51
|
+
"./lz4/decompress": "./dist/algorithms/lz4/decompress/index.js",
|
|
52
|
+
"./lz4/compress": "./dist/algorithms/lz4/compress/index.js",
|
|
53
|
+
"./xz": "./dist/algorithms/xz/index.js",
|
|
54
|
+
"./xz/decompress": "./dist/algorithms/xz/decompress/index.js",
|
|
55
|
+
"./xz/compress": "./dist/algorithms/xz/compress/index.js",
|
|
56
|
+
"./snappy": "./dist/algorithms/snappy/index.js",
|
|
57
|
+
"./snappy/decompress": "./dist/algorithms/snappy/decompress/index.js",
|
|
58
|
+
"./snappy/compress": "./dist/algorithms/snappy/compress/index.js",
|
|
59
|
+
"./gzip": "./dist/algorithms/gzip/index.js",
|
|
60
|
+
"./gzip/decompress": "./dist/algorithms/gzip/decompress/index.js",
|
|
61
|
+
"./gzip/compress": "./dist/algorithms/gzip/compress/index.js"
|
|
43
62
|
},
|
|
44
63
|
"imports": {
|
|
45
64
|
"#resolver": {
|
|
@@ -62,6 +81,7 @@
|
|
|
62
81
|
"build": "npm run build:wasm && npm run build:ts",
|
|
63
82
|
"test": "vitest run",
|
|
64
83
|
"test:watch": "vitest",
|
|
84
|
+
"test:size": "vitest run tests/bundle.test.ts",
|
|
65
85
|
"test:browser": "playwright test",
|
|
66
86
|
"test:deno": "deno run --allow-read --allow-env tests-runtime/deno-smoke.ts",
|
|
67
87
|
"test:bun": "bun test --bun tests/",
|