compress-utils 0.7.1 → 0.9.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 +68 -24
- package/THIRD_PARTY_NOTICES.md +270 -0
- 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 +14 -0
- package/dist/algorithms/brotli/compress/index.d.ts.map +1 -0
- package/dist/algorithms/brotli/compress/index.js +21 -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 +15 -0
- package/dist/algorithms/brotli/decompress/index.d.ts.map +1 -0
- package/dist/algorithms/brotli/decompress/index.js +22 -0
- package/dist/algorithms/brotli/decompress/index.js.map +1 -0
- package/dist/algorithms/brotli/index.d.ts +10 -0
- package/dist/algorithms/brotli/index.d.ts.map +1 -1
- package/dist/algorithms/brotli/index.js +10 -0
- package/dist/algorithms/brotli/index.js.map +1 -1
- 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 +14 -0
- package/dist/algorithms/bz2/compress/index.d.ts.map +1 -0
- package/dist/algorithms/bz2/compress/index.js +21 -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 +15 -0
- package/dist/algorithms/bz2/decompress/index.d.ts.map +1 -0
- package/dist/algorithms/bz2/decompress/index.js +22 -0
- package/dist/algorithms/bz2/decompress/index.js.map +1 -0
- package/dist/algorithms/bz2/index.d.ts +10 -0
- package/dist/algorithms/bz2/index.d.ts.map +1 -1
- package/dist/algorithms/bz2/index.js +10 -0
- package/dist/algorithms/bz2/index.js.map +1 -1
- package/dist/algorithms/deflate/compress/index.d.ts +11 -0
- package/dist/algorithms/deflate/compress/index.d.ts.map +1 -0
- package/dist/algorithms/deflate/compress/index.js +18 -0
- package/dist/algorithms/deflate/compress/index.js.map +1 -0
- package/dist/algorithms/deflate/decompress/index.d.ts +12 -0
- package/dist/algorithms/deflate/decompress/index.d.ts.map +1 -0
- package/dist/algorithms/deflate/decompress/index.js +19 -0
- package/dist/algorithms/deflate/decompress/index.js.map +1 -0
- package/dist/algorithms/deflate/index.d.ts +17 -0
- package/dist/algorithms/deflate/index.d.ts.map +1 -0
- package/dist/algorithms/deflate/index.js +22 -0
- package/dist/algorithms/deflate/index.js.map +1 -0
- package/dist/algorithms/gzip/compress/gzip.wasm +0 -0
- package/dist/algorithms/gzip/compress/index.d.ts +14 -0
- package/dist/algorithms/gzip/compress/index.d.ts.map +1 -0
- package/dist/algorithms/gzip/compress/index.js +21 -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 +15 -0
- package/dist/algorithms/gzip/decompress/index.d.ts.map +1 -0
- package/dist/algorithms/gzip/decompress/index.js +22 -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 +22 -0
- package/dist/algorithms/gzip/index.d.ts.map +1 -0
- package/dist/algorithms/gzip/index.js +27 -0
- package/dist/algorithms/gzip/index.js.map +1 -0
- package/dist/algorithms/lz4/compress/index.d.ts +14 -0
- package/dist/algorithms/lz4/compress/index.d.ts.map +1 -0
- package/dist/algorithms/lz4/compress/index.js +21 -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 +15 -0
- package/dist/algorithms/lz4/decompress/index.d.ts.map +1 -0
- package/dist/algorithms/lz4/decompress/index.js +22 -0
- package/dist/algorithms/lz4/decompress/index.js.map +1 -0
- package/dist/algorithms/lz4/decompress/lz4.wasm +0 -0
- package/dist/algorithms/lz4/index.d.ts +10 -0
- package/dist/algorithms/lz4/index.d.ts.map +1 -1
- package/dist/algorithms/lz4/index.js +10 -0
- package/dist/algorithms/lz4/index.js.map +1 -1
- package/dist/algorithms/lz4/lz4.wasm +0 -0
- package/dist/algorithms/lz4_raw/compress/index.d.ts +7 -0
- package/dist/algorithms/lz4_raw/compress/index.d.ts.map +1 -0
- package/dist/algorithms/lz4_raw/compress/index.js +15 -0
- package/dist/algorithms/lz4_raw/compress/index.js.map +1 -0
- package/dist/algorithms/lz4_raw/decompress/index.d.ts +11 -0
- package/dist/algorithms/lz4_raw/decompress/index.d.ts.map +1 -0
- package/dist/algorithms/lz4_raw/decompress/index.js +25 -0
- package/dist/algorithms/lz4_raw/decompress/index.js.map +1 -0
- package/dist/algorithms/lz4_raw/index.d.ts +13 -0
- package/dist/algorithms/lz4_raw/index.d.ts.map +1 -0
- package/dist/algorithms/lz4_raw/index.js +25 -0
- package/dist/algorithms/lz4_raw/index.js.map +1 -0
- package/dist/algorithms/lzo/decompress/index.d.ts +15 -0
- package/dist/algorithms/lzo/decompress/index.d.ts.map +1 -0
- package/dist/algorithms/lzo/decompress/index.js +21 -0
- package/dist/algorithms/lzo/decompress/index.js.map +1 -0
- package/dist/algorithms/lzo/decompress/lzo.wasm +0 -0
- package/dist/algorithms/snappy/compress/index.d.ts +14 -0
- package/dist/algorithms/snappy/compress/index.d.ts.map +1 -0
- package/dist/algorithms/snappy/compress/index.js +21 -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 +15 -0
- package/dist/algorithms/snappy/decompress/index.d.ts.map +1 -0
- package/dist/algorithms/snappy/decompress/index.js +22 -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 +22 -0
- package/dist/algorithms/snappy/index.d.ts.map +1 -0
- package/dist/algorithms/snappy/index.js +27 -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 +14 -0
- package/dist/algorithms/xz/compress/index.d.ts.map +1 -0
- package/dist/algorithms/xz/compress/index.js +21 -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 +15 -0
- package/dist/algorithms/xz/decompress/index.d.ts.map +1 -0
- package/dist/algorithms/xz/decompress/index.js +22 -0
- package/dist/algorithms/xz/decompress/index.js.map +1 -0
- package/dist/algorithms/xz/decompress/xz.wasm +0 -0
- package/dist/algorithms/xz/index.d.ts +10 -0
- package/dist/algorithms/xz/index.d.ts.map +1 -1
- package/dist/algorithms/xz/index.js +10 -0
- package/dist/algorithms/xz/index.js.map +1 -1
- package/dist/algorithms/xz/xz.wasm +0 -0
- package/dist/algorithms/zlib/compress/index.d.ts +14 -0
- package/dist/algorithms/zlib/compress/index.d.ts.map +1 -0
- package/dist/algorithms/zlib/compress/index.js +21 -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 +15 -0
- package/dist/algorithms/zlib/decompress/index.d.ts.map +1 -0
- package/dist/algorithms/zlib/decompress/index.js +22 -0
- package/dist/algorithms/zlib/decompress/index.js.map +1 -0
- package/dist/algorithms/zlib/decompress/zlib.wasm +0 -0
- package/dist/algorithms/zlib/index.d.ts +10 -0
- package/dist/algorithms/zlib/index.d.ts.map +1 -1
- package/dist/algorithms/zlib/index.js +10 -0
- package/dist/algorithms/zlib/index.js.map +1 -1
- package/dist/algorithms/zlib/zlib.wasm +0 -0
- package/dist/algorithms/zstd/compress/index.d.ts +14 -0
- package/dist/algorithms/zstd/compress/index.d.ts.map +1 -0
- package/dist/algorithms/zstd/compress/index.js +21 -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 +15 -0
- package/dist/algorithms/zstd/decompress/index.d.ts.map +1 -0
- package/dist/algorithms/zstd/decompress/index.js +22 -0
- package/dist/algorithms/zstd/decompress/index.js.map +1 -0
- package/dist/algorithms/zstd/decompress/zstd.wasm +0 -0
- package/dist/algorithms/zstd/index.d.ts +10 -0
- package/dist/algorithms/zstd/index.d.ts.map +1 -1
- package/dist/algorithms/zstd/index.js +10 -0
- package/dist/algorithms/zstd/index.js.map +1 -1
- package/dist/algorithms/zstd/zstd.wasm +0 -0
- package/dist/core/capacity.d.ts +4 -0
- package/dist/core/capacity.d.ts.map +1 -0
- package/dist/core/capacity.js +12 -0
- package/dist/core/capacity.js.map +1 -0
- package/dist/core/dispatch.d.ts +10 -0
- package/dist/core/dispatch.d.ts.map +1 -1
- package/dist/core/dispatch.js +51 -5
- package/dist/core/dispatch.js.map +1 -1
- package/dist/core/types.d.ts +7 -2
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +5 -0
- package/dist/core/types.js.map +1 -1
- package/package.json +37 -8
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,21 +14,21 @@ npm install compress-utils
|
|
|
14
14
|
# or: pnpm add / yarn add / bun add / deno add npm:compress-utils
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
No native dependencies, no `postinstall` scripts. Pure WebAssembly. TypeScript types are bundled.
|
|
18
|
-
|
|
19
17
|
### CDN (no bundler)
|
|
20
18
|
|
|
21
19
|
The package is published as ESM. You can pull it straight from a CDN — no install step, no build step.
|
|
22
20
|
|
|
23
21
|
```html
|
|
24
22
|
<script type="module">
|
|
25
|
-
import { compress, decompress } from
|
|
26
|
-
|
|
23
|
+
import { compress, decompress } from
|
|
24
|
+
"https://esm.sh/compress-utils/zstd";
|
|
25
|
+
|
|
26
|
+
const out = await compress(
|
|
27
|
+
new TextEncoder().encode("hello")
|
|
28
|
+
);
|
|
27
29
|
</script>
|
|
28
30
|
```
|
|
29
31
|
|
|
30
|
-
Alternate CDN endpoints:
|
|
31
|
-
|
|
32
32
|
| CDN | Per-algo URL |
|
|
33
33
|
|------------|-----------------------------------------------------------------------|
|
|
34
34
|
| esm.sh | `https://esm.sh/compress-utils/<algo>` |
|
|
@@ -48,7 +48,7 @@ const compressed = await compress(input, { level: 9 });
|
|
|
48
48
|
const restored = await decompress(compressed);
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
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).
|
|
52
52
|
|
|
53
53
|
### Web Streams
|
|
54
54
|
|
|
@@ -76,16 +76,50 @@ If `using` isn't available in your toolchain, call `cs.destroy()` explicitly —
|
|
|
76
76
|
|
|
77
77
|
## Supported algorithms
|
|
78
78
|
|
|
79
|
-
| Algorithm | Subpath |
|
|
80
|
-
|
|
81
|
-
| zlib | `compress-utils/zlib` |
|
|
82
|
-
| bzip2 | `compress-utils/bz2` |
|
|
83
|
-
| XZ/LZMA | `compress-utils/xz` |
|
|
84
|
-
| LZ4 | `compress-utils/lz4` |
|
|
85
|
-
| Zstandard | `compress-utils/zstd` |
|
|
86
|
-
| 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) |
|
|
89
|
+
| LZO | `compress-utils/lzo/decompress` | Raw LZO1X block (decompress only; pass `{expectedSize}` as output capacity) |
|
|
90
|
+
|
|
91
|
+
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)**.
|
|
87
92
|
|
|
88
|
-
|
|
93
|
+
## Bundle size
|
|
94
|
+
|
|
95
|
+
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:
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
// decoder only, 90 KB
|
|
99
|
+
import { decompress } from "compress-utils/zstd/decompress";
|
|
100
|
+
|
|
101
|
+
// or, encoder only:
|
|
102
|
+
import { compress } from "compress-utils/zstd/compress";
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
- **`/decompress`** exposes `decompress`, `createDecompressStream`, `decompressionStream`, `setMaxDecompressedSize`, `version`.
|
|
106
|
+
- **`/compress`** exposes `compress`, `createCompressStream`, `compressionStream`, `version`.
|
|
107
|
+
- The default subpath keeps **both**
|
|
108
|
+
|
|
109
|
+
Comparison of the gzipped sizes:
|
|
110
|
+
|
|
111
|
+
| algo | full | decompress-only | compress-only |
|
|
112
|
+
|--------|--------------:|----------------------:|----------------------:|
|
|
113
|
+
| zstd | 128K | 36K | 106K |
|
|
114
|
+
| brotli | 169K | 84K | 154K |
|
|
115
|
+
| lz4 | 39K | 15K | 35K |
|
|
116
|
+
| bz2 | 33K | 22K | 25K |
|
|
117
|
+
| xz | 62K | 43K | 51K |
|
|
118
|
+
| zlib | 33K | 25K | 26K |
|
|
119
|
+
| snappy | 36K | 32K | 28K |
|
|
120
|
+
| gzip | 80K | 52K | 60K |
|
|
121
|
+
|
|
122
|
+
The `.wasm` is the bulk of what ships; the JS glue is a few KB, shared, and tree-shaken to the methods you import.
|
|
89
123
|
|
|
90
124
|
## Compression levels
|
|
91
125
|
|
|
@@ -118,16 +152,26 @@ const opts: CompressOptions = { level: 7 };
|
|
|
118
152
|
const compressed: Uint8Array = await compress(input, opts);
|
|
119
153
|
```
|
|
120
154
|
|
|
121
|
-
##
|
|
155
|
+
## Preloading and synchronous calls
|
|
122
156
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
- Browsers, Deno, and Bun get `WebAssembly.instantiateStreaming` — bytes compile while they download. Node uses the buffered path because its `fetch` doesn't speak `file://`.
|
|
157
|
+
Each algorithm and direction-specific subpath exports `preload()`. It loads and
|
|
158
|
+
initializes that subpath's WASM module once; concurrent calls share initialization.
|
|
159
|
+
A failed initialization can be retried. No codec work is performed by preload.
|
|
127
160
|
|
|
128
|
-
|
|
161
|
+
```ts
|
|
162
|
+
import { preload, compressSync, decompressSync } from "compress-utils/zlib";
|
|
163
|
+
await preload();
|
|
164
|
+
const compressed = compressSync(new TextEncoder().encode("hello"));
|
|
165
|
+
const restored = decompressSync(compressed);
|
|
166
|
+
```
|
|
129
167
|
|
|
130
|
-
|
|
168
|
+
`compressSync`, `decompressSync`, `createCompressStreamSync`, and
|
|
169
|
+
`createDecompressStreamSync` are available for the directions exposed by the
|
|
170
|
+
subpath. They throw with a `preload()` instruction before initialization completes.
|
|
171
|
+
Existing asynchronous APIs initialize automatically and also enable subsequent
|
|
172
|
+
synchronous calls. Initializing one subpath does not initialize another: encoder
|
|
173
|
+
and decoder subpaths use different WASM modules. Sync calls block the calling
|
|
174
|
+
thread; use a worker for expensive operations.
|
|
131
175
|
|
|
132
176
|
## License
|
|
133
177
|
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
compress-utils is MIT-licensed (see `LICENSE`). It also contains code from the projects below, each under its own license, and their license texts are reproduced here as those licenses require. The Python wheel, npm package, Rust crate and Go module all ship this file; a build that includes only some codecs contains only those codecs' code.
|
|
4
|
+
|
|
5
|
+
Pinned versions are recorded in `third_party/manifest.json` and `third_party/VENDOR.md`.
|
|
6
|
+
|
|
7
|
+
## Zstandard (zstd)
|
|
8
|
+
|
|
9
|
+
- **Source**: https://github.com/facebook/zstd at `v1.5.7` (`third_party/zstd/`)
|
|
10
|
+
- **License**: BSD-3-Clause
|
|
11
|
+
- **Note**: zstd is dual-licensed; compress-utils uses it under the BSD license.
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
BSD License
|
|
15
|
+
|
|
16
|
+
For Zstandard software
|
|
17
|
+
|
|
18
|
+
Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved.
|
|
19
|
+
|
|
20
|
+
Redistribution and use in source and binary forms, with or without modification,
|
|
21
|
+
are permitted provided that the following conditions are met:
|
|
22
|
+
|
|
23
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
24
|
+
list of conditions and the following disclaimer.
|
|
25
|
+
|
|
26
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
27
|
+
this list of conditions and the following disclaimer in the documentation
|
|
28
|
+
and/or other materials provided with the distribution.
|
|
29
|
+
|
|
30
|
+
* Neither the name Facebook, nor Meta, nor the names of its contributors may
|
|
31
|
+
be used to endorse or promote products derived from this software without
|
|
32
|
+
specific prior written permission.
|
|
33
|
+
|
|
34
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
35
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
36
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
37
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
|
38
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
39
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
40
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
41
|
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
42
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
43
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Brotli
|
|
47
|
+
|
|
48
|
+
- **Source**: https://github.com/google/brotli at `v1.2.0` (`third_party/brotli/`)
|
|
49
|
+
- **License**: MIT
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors.
|
|
53
|
+
|
|
54
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
55
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
56
|
+
in the Software without restriction, including without limitation the rights
|
|
57
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
58
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
59
|
+
furnished to do so, subject to the following conditions:
|
|
60
|
+
|
|
61
|
+
The above copyright notice and this permission notice shall be included in
|
|
62
|
+
all copies or substantial portions of the Software.
|
|
63
|
+
|
|
64
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
65
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
66
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
67
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
68
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
69
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
70
|
+
THE SOFTWARE.
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## zlib
|
|
74
|
+
|
|
75
|
+
- **Source**: https://github.com/madler/zlib at `v1.3.2` (`third_party/zlib/`)
|
|
76
|
+
- **License**: Zlib
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
Copyright notice:
|
|
80
|
+
|
|
81
|
+
(C) 1995-2026 Jean-loup Gailly and Mark Adler
|
|
82
|
+
|
|
83
|
+
This software is provided 'as-is', without any express or implied
|
|
84
|
+
warranty. In no event will the authors be held liable for any damages
|
|
85
|
+
arising from the use of this software.
|
|
86
|
+
|
|
87
|
+
Permission is granted to anyone to use this software for any purpose,
|
|
88
|
+
including commercial applications, and to alter it and redistribute it
|
|
89
|
+
freely, subject to the following restrictions:
|
|
90
|
+
|
|
91
|
+
1. The origin of this software must not be misrepresented; you must not
|
|
92
|
+
claim that you wrote the original software. If you use this software
|
|
93
|
+
in a product, an acknowledgment in the product documentation would be
|
|
94
|
+
appreciated but is not required.
|
|
95
|
+
2. Altered source versions must be plainly marked as such, and must not be
|
|
96
|
+
misrepresented as being the original software.
|
|
97
|
+
3. This notice may not be removed or altered from any source distribution.
|
|
98
|
+
|
|
99
|
+
Jean-loup Gailly Mark Adler
|
|
100
|
+
jloup@gzip.org madler@alumni.caltech.edu
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## bzip2
|
|
104
|
+
|
|
105
|
+
- **Source**: https://gitlab.com/bzip2/bzip2 at `bzip2-1.0.8` (`third_party/bz2/`)
|
|
106
|
+
- **License**: bzip2-1.0.6
|
|
107
|
+
|
|
108
|
+
```text
|
|
109
|
+
--------------------------------------------------------------------------
|
|
110
|
+
|
|
111
|
+
This program, "bzip2", the associated library "libbzip2", and all
|
|
112
|
+
documentation, are copyright (C) 1996-2019 Julian R Seward. All
|
|
113
|
+
rights reserved.
|
|
114
|
+
|
|
115
|
+
Redistribution and use in source and binary forms, with or without
|
|
116
|
+
modification, are permitted provided that the following conditions
|
|
117
|
+
are met:
|
|
118
|
+
|
|
119
|
+
1. Redistributions of source code must retain the above copyright
|
|
120
|
+
notice, this list of conditions and the following disclaimer.
|
|
121
|
+
|
|
122
|
+
2. The origin of this software must not be misrepresented; you must
|
|
123
|
+
not claim that you wrote the original software. If you use this
|
|
124
|
+
software in a product, an acknowledgment in the product
|
|
125
|
+
documentation would be appreciated but is not required.
|
|
126
|
+
|
|
127
|
+
3. Altered source versions must be plainly marked as such, and must
|
|
128
|
+
not be misrepresented as being the original software.
|
|
129
|
+
|
|
130
|
+
4. The name of the author may not be used to endorse or promote
|
|
131
|
+
products derived from this software without specific prior written
|
|
132
|
+
permission.
|
|
133
|
+
|
|
134
|
+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
|
135
|
+
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
136
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
137
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
|
138
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
139
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
|
140
|
+
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
141
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
142
|
+
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
143
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
144
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
145
|
+
|
|
146
|
+
Julian Seward, jseward@acm.org
|
|
147
|
+
bzip2/libbzip2 version 1.0.8 of 13 July 2019
|
|
148
|
+
|
|
149
|
+
--------------------------------------------------------------------------
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## LZ4
|
|
153
|
+
|
|
154
|
+
- **Source**: https://github.com/lz4/lz4 at `v1.10.0` (`third_party/lz4/`)
|
|
155
|
+
- **License**: BSD-2-Clause
|
|
156
|
+
- **Note**: Only the LZ4 library (`lib/`) is included; this is its license.
|
|
157
|
+
|
|
158
|
+
```text
|
|
159
|
+
LZ4 Library
|
|
160
|
+
Copyright (c) 2011-2020, Yann Collet
|
|
161
|
+
All rights reserved.
|
|
162
|
+
|
|
163
|
+
Redistribution and use in source and binary forms, with or without modification,
|
|
164
|
+
are permitted provided that the following conditions are met:
|
|
165
|
+
|
|
166
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
167
|
+
list of conditions and the following disclaimer.
|
|
168
|
+
|
|
169
|
+
* Redistributions in binary form must reproduce the above copyright notice, this
|
|
170
|
+
list of conditions and the following disclaimer in the documentation and/or
|
|
171
|
+
other materials provided with the distribution.
|
|
172
|
+
|
|
173
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
174
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
175
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
176
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
|
177
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
178
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
179
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
180
|
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
181
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
182
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## XZ Utils (liblzma)
|
|
186
|
+
|
|
187
|
+
- **Source**: https://github.com/tukaani-project/xz at `v5.8.3` (`third_party/xz/`)
|
|
188
|
+
- **License**: 0BSD
|
|
189
|
+
- **Note**: Only liblzma is included; it is under the BSD Zero Clause License.
|
|
190
|
+
|
|
191
|
+
```text
|
|
192
|
+
Permission to use, copy, modify, and/or distribute this
|
|
193
|
+
software for any purpose with or without fee is hereby granted.
|
|
194
|
+
|
|
195
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
196
|
+
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
197
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
|
|
198
|
+
THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
|
|
199
|
+
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
200
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
|
201
|
+
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
|
202
|
+
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## snappy-c
|
|
206
|
+
|
|
207
|
+
- **Source**: https://github.com/andikleen/snappy-c at `fef67ac6effb40c83fb5e37eaf243381fa056f9b` (`third_party/snappy/`)
|
|
208
|
+
- **License**: BSD-3-Clause
|
|
209
|
+
|
|
210
|
+
```text
|
|
211
|
+
The snappy-c code is under the same license as the original snappy source
|
|
212
|
+
|
|
213
|
+
Copyright 2011 Intel Corporation All Rights Reserved.
|
|
214
|
+
|
|
215
|
+
Redistribution and use in source and binary forms, with or without
|
|
216
|
+
modification, are permitted provided that the following conditions are
|
|
217
|
+
met:
|
|
218
|
+
|
|
219
|
+
* Redistributions of source code must retain the above copyright
|
|
220
|
+
notice, this list of conditions and the following disclaimer.
|
|
221
|
+
* Redistributions in binary form must reproduce the above
|
|
222
|
+
copyright notice, this list of conditions and the following disclaimer
|
|
223
|
+
in the documentation and/or other materials provided with the
|
|
224
|
+
distribution.
|
|
225
|
+
* Neither the name of Intel Corporation nor the names of its
|
|
226
|
+
contributors may be used to endorse or promote products derived from
|
|
227
|
+
this software without specific prior written permission.
|
|
228
|
+
|
|
229
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
230
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
231
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
232
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
233
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
234
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
235
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
236
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
237
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
238
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
239
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## lzokay
|
|
243
|
+
|
|
244
|
+
- **Source**: https://github.com/AxioDL/lzokay at `db2df1fcbebc2ed06c10f727f72567d40f06a2be` (`third_party/lzokay/`)
|
|
245
|
+
- **License**: MIT
|
|
246
|
+
- **Note**: Decoder-only C adaptation; see `third_party/lzokay/PROVENANCE.md`.
|
|
247
|
+
|
|
248
|
+
```text
|
|
249
|
+
The MIT License
|
|
250
|
+
|
|
251
|
+
Copyright (c) 2018 Jack Andersen
|
|
252
|
+
|
|
253
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
254
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
255
|
+
in the Software without restriction, including without limitation the rights
|
|
256
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
257
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
258
|
+
furnished to do so, subject to the following conditions:
|
|
259
|
+
|
|
260
|
+
The above copyright notice and this permission notice shall be included in all
|
|
261
|
+
copies or substantial portions of the Software.
|
|
262
|
+
|
|
263
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
264
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
265
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
266
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
267
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
268
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
269
|
+
SOFTWARE.
|
|
270
|
+
```
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const compress: (input: Uint8Array, opts?: import("./index.js").CompressOptions) => Promise<Uint8Array>;
|
|
2
|
+
/** Synchronous counterpart; requires completed preload(). */
|
|
3
|
+
export declare const compressSync: (input: Uint8Array, opts?: import("./index.js").CompressOptions) => Uint8Array;
|
|
4
|
+
export declare const createCompressStream: (opts?: import("./index.js").CompressOptions) => Promise<import("./index.js").CompressStream>;
|
|
5
|
+
/** Synchronous counterpart; requires completed preload(). */
|
|
6
|
+
export declare const createCompressStreamSync: (opts?: import("./index.js").CompressOptions) => import("./index.js").CompressStream;
|
|
7
|
+
export declare const compressionStream: (opts?: import("./index.js").CompressOptions) => TransformStream<Uint8Array, Uint8Array>;
|
|
8
|
+
/** Initializes this independently loaded WASM subpath. */
|
|
9
|
+
export declare const preload: () => Promise<void>;
|
|
10
|
+
export declare const version: () => Promise<string>;
|
|
11
|
+
export { CompressError } from "../../../core/types.js";
|
|
12
|
+
export type { CompressOptions, AlgorithmName } from "../../../core/types.js";
|
|
13
|
+
export type { CompressStream } from "../../../core/dispatch.js";
|
|
14
|
+
//# 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,6DAA6D;AAC7D,eAAO,MAAM,YAAY,gFAAwB,CAAC;AAClD,eAAO,MAAM,oBAAoB,+FAAgC,CAAC;AAClE,6DAA6D;AAC7D,eAAO,MAAM,wBAAwB,sFAAoC,CAAC;AAC1E,eAAO,MAAM,iBAAiB,0FAA6B,CAAC;AAC5D,0DAA0D;AAC1D,eAAO,MAAM,OAAO,qBAAmB,CAAC;AACxC,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,21 @@
|
|
|
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
|
+
/** Synchronous counterpart; requires completed preload(). */
|
|
12
|
+
export const compressSync = bindings.compressSync;
|
|
13
|
+
export const createCompressStream = bindings.createCompressStream;
|
|
14
|
+
/** Synchronous counterpart; requires completed preload(). */
|
|
15
|
+
export const createCompressStreamSync = bindings.createCompressStreamSync;
|
|
16
|
+
export const compressionStream = bindings.compressionStream;
|
|
17
|
+
/** Initializes this independently loaded WASM subpath. */
|
|
18
|
+
export const preload = bindings.preload;
|
|
19
|
+
export const version = bindings.version;
|
|
20
|
+
export { CompressError } from "../../../core/types.js";
|
|
21
|
+
//# 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,OAAO,IAAI,CAAC,GAAG,CAAC,CAC5C,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;AAC1C,6DAA6D;AAC7D,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC;AAClD,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,oBAAoB,CAAC;AAClE,6DAA6D;AAC7D,MAAM,CAAC,MAAM,wBAAwB,GAAG,QAAQ,CAAC,wBAAwB,CAAC;AAC1E,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,iBAAiB,CAAC;AAC5D,0DAA0D;AAC1D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AACxC,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const decompress: (input: Uint8Array, opts?: import("./index.js").DecompressOptions) => Promise<Uint8Array>;
|
|
2
|
+
/** Synchronous counterpart; requires completed preload(). */
|
|
3
|
+
export declare const decompressSync: (input: Uint8Array, opts?: import("./index.js").DecompressOptions) => Uint8Array;
|
|
4
|
+
export declare const createDecompressStream: () => Promise<import("./index.js").DecompressStream>;
|
|
5
|
+
/** Synchronous counterpart; requires completed preload(). */
|
|
6
|
+
export declare const createDecompressStreamSync: () => import("./index.js").DecompressStream;
|
|
7
|
+
export declare const decompressionStream: () => TransformStream<Uint8Array, Uint8Array>;
|
|
8
|
+
/** Initializes this independently loaded WASM subpath. */
|
|
9
|
+
export declare const preload: () => Promise<void>;
|
|
10
|
+
export declare const version: () => Promise<string>;
|
|
11
|
+
export declare const setMaxDecompressedSize: (bytes: number) => Promise<void>;
|
|
12
|
+
export { CompressError } from "../../../core/types.js";
|
|
13
|
+
export type { DecompressOptions, AlgorithmName } from "../../../core/types.js";
|
|
14
|
+
export type { DecompressStream } from "../../../core/dispatch.js";
|
|
15
|
+
//# 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,6DAA6D;AAC7D,eAAO,MAAM,cAAc,kFAA0B,CAAC;AACtD,eAAO,MAAM,sBAAsB,sDAAkC,CAAC;AACtE,6DAA6D;AAC7D,eAAO,MAAM,0BAA0B,6CAAsC,CAAC;AAC9E,eAAO,MAAM,mBAAmB,+CAA+B,CAAC;AAChE,0DAA0D;AAC1D,eAAO,MAAM,OAAO,qBAAmB,CAAC;AACxC,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,22 @@
|
|
|
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
|
+
/** Synchronous counterpart; requires completed preload(). */
|
|
12
|
+
export const decompressSync = bindings.decompressSync;
|
|
13
|
+
export const createDecompressStream = bindings.createDecompressStream;
|
|
14
|
+
/** Synchronous counterpart; requires completed preload(). */
|
|
15
|
+
export const createDecompressStreamSync = bindings.createDecompressStreamSync;
|
|
16
|
+
export const decompressionStream = bindings.decompressionStream;
|
|
17
|
+
/** Initializes this independently loaded WASM subpath. */
|
|
18
|
+
export const preload = bindings.preload;
|
|
19
|
+
export const version = bindings.version;
|
|
20
|
+
export const setMaxDecompressedSize = bindings.setMaxDecompressedSize;
|
|
21
|
+
export { CompressError } from "../../../core/types.js";
|
|
22
|
+
//# 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,OAAO,IAAI,CAAC,GAAG,CAAC,CAC5C,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;AAC9C,6DAA6D;AAC7D,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC;AACtD,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AACtE,6DAA6D;AAC7D,MAAM,CAAC,MAAM,0BAA0B,GAAG,QAAQ,CAAC,0BAA0B,CAAC;AAC9E,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC;AAChE,0DAA0D;AAC1D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AACxC,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"}
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
export declare const compress: (input: Uint8Array, opts?: import("./index.js").CompressOptions) => Promise<Uint8Array>;
|
|
2
|
+
/** Synchronous counterpart; requires completed preload(). */
|
|
3
|
+
export declare const compressSync: (input: Uint8Array, opts?: import("./index.js").CompressOptions) => Uint8Array;
|
|
2
4
|
export declare const decompress: (input: Uint8Array, opts?: import("./index.js").DecompressOptions) => Promise<Uint8Array>;
|
|
5
|
+
/** Synchronous counterpart; requires completed preload(). */
|
|
6
|
+
export declare const decompressSync: (input: Uint8Array, opts?: import("./index.js").DecompressOptions) => Uint8Array;
|
|
3
7
|
export declare const createCompressStream: (opts?: import("./index.js").CompressOptions) => Promise<import("./index.js").CompressStream>;
|
|
8
|
+
/** Synchronous counterpart; requires completed preload(). */
|
|
9
|
+
export declare const createCompressStreamSync: (opts?: import("./index.js").CompressOptions) => import("./index.js").CompressStream;
|
|
4
10
|
export declare const createDecompressStream: () => Promise<import("./index.js").DecompressStream>;
|
|
11
|
+
/** Synchronous counterpart; requires completed preload(). */
|
|
12
|
+
export declare const createDecompressStreamSync: () => import("./index.js").DecompressStream;
|
|
5
13
|
export declare const compressionStream: (opts?: import("./index.js").CompressOptions) => TransformStream<Uint8Array, Uint8Array>;
|
|
6
14
|
export declare const decompressionStream: () => TransformStream<Uint8Array, Uint8Array>;
|
|
15
|
+
/** Initializes this independently loaded WASM subpath. */
|
|
16
|
+
export declare const preload: () => Promise<void>;
|
|
7
17
|
export declare const version: () => Promise<string>;
|
|
8
18
|
export declare const setMaxDecompressedSize: (bytes: number) => Promise<void>;
|
|
9
19
|
export { CompressError } from "../../core/types.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/algorithms/brotli/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"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/algorithms/brotli/index.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,QAAQ,yFAAoB,CAAC;AAC1C,6DAA6D;AAC7D,eAAO,MAAM,YAAY,gFAAwB,CAAC;AAClD,eAAO,MAAM,UAAU,2FAAsB,CAAC;AAC9C,6DAA6D;AAC7D,eAAO,MAAM,cAAc,kFAA0B,CAAC;AACtD,eAAO,MAAM,oBAAoB,+FAAgC,CAAC;AAClE,6DAA6D;AAC7D,eAAO,MAAM,wBAAwB,sFAAoC,CAAC;AAC1E,eAAO,MAAM,sBAAsB,sDAAkC,CAAC;AACtE,6DAA6D;AAC7D,eAAO,MAAM,0BAA0B,6CAAsC,CAAC;AAC9E,eAAO,MAAM,iBAAiB,0FAA6B,CAAC;AAC5D,eAAO,MAAM,mBAAmB,+CAA+B,CAAC;AAChE,0DAA0D;AAC1D,eAAO,MAAM,OAAO,qBAAmB,CAAC;AACxC,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"}
|
|
@@ -6,11 +6,21 @@ import { defineAlgorithm } from "../../core/algorithm.js";
|
|
|
6
6
|
import { Algorithm } from "../../core/types.js";
|
|
7
7
|
const bindings = /*#__PURE__*/ defineAlgorithm(Algorithm.Brotli, "brotli", new URL("./brotli.wasm", import.meta.url));
|
|
8
8
|
export const compress = bindings.compress;
|
|
9
|
+
/** Synchronous counterpart; requires completed preload(). */
|
|
10
|
+
export const compressSync = bindings.compressSync;
|
|
9
11
|
export const decompress = bindings.decompress;
|
|
12
|
+
/** Synchronous counterpart; requires completed preload(). */
|
|
13
|
+
export const decompressSync = bindings.decompressSync;
|
|
10
14
|
export const createCompressStream = bindings.createCompressStream;
|
|
15
|
+
/** Synchronous counterpart; requires completed preload(). */
|
|
16
|
+
export const createCompressStreamSync = bindings.createCompressStreamSync;
|
|
11
17
|
export const createDecompressStream = bindings.createDecompressStream;
|
|
18
|
+
/** Synchronous counterpart; requires completed preload(). */
|
|
19
|
+
export const createDecompressStreamSync = bindings.createDecompressStreamSync;
|
|
12
20
|
export const compressionStream = bindings.compressionStream;
|
|
13
21
|
export const decompressionStream = bindings.decompressionStream;
|
|
22
|
+
/** Initializes this independently loaded WASM subpath. */
|
|
23
|
+
export const preload = bindings.preload;
|
|
14
24
|
export const version = bindings.version;
|
|
15
25
|
export const setMaxDecompressedSize = bindings.setMaxDecompressedSize;
|
|
16
26
|
export { CompressError } from "../../core/types.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/algorithms/brotli/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,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/algorithms/brotli/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,OAAO,IAAI,CAAC,GAAG,CAAC,CAC5C,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;AAC1C,6DAA6D;AAC7D,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC;AAClD,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;AAC9C,6DAA6D;AAC7D,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC;AACtD,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,oBAAoB,CAAC;AAClE,6DAA6D;AAC7D,MAAM,CAAC,MAAM,wBAAwB,GAAG,QAAQ,CAAC,wBAAwB,CAAC;AAC1E,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;AACtE,6DAA6D;AAC7D,MAAM,CAAC,MAAM,0BAA0B,GAAG,QAAQ,CAAC,0BAA0B,CAAC;AAC9E,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,iBAAiB,CAAC;AAC5D,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,CAAC;AAChE,0DAA0D;AAC1D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AACxC,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
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const compress: (input: Uint8Array, opts?: import("./index.js").CompressOptions) => Promise<Uint8Array>;
|
|
2
|
+
/** Synchronous counterpart; requires completed preload(). */
|
|
3
|
+
export declare const compressSync: (input: Uint8Array, opts?: import("./index.js").CompressOptions) => Uint8Array;
|
|
4
|
+
export declare const createCompressStream: (opts?: import("./index.js").CompressOptions) => Promise<import("./index.js").CompressStream>;
|
|
5
|
+
/** Synchronous counterpart; requires completed preload(). */
|
|
6
|
+
export declare const createCompressStreamSync: (opts?: import("./index.js").CompressOptions) => import("./index.js").CompressStream;
|
|
7
|
+
export declare const compressionStream: (opts?: import("./index.js").CompressOptions) => TransformStream<Uint8Array, Uint8Array>;
|
|
8
|
+
/** Initializes this independently loaded WASM subpath. */
|
|
9
|
+
export declare const preload: () => Promise<void>;
|
|
10
|
+
export declare const version: () => Promise<string>;
|
|
11
|
+
export { CompressError } from "../../../core/types.js";
|
|
12
|
+
export type { CompressOptions, AlgorithmName } from "../../../core/types.js";
|
|
13
|
+
export type { CompressStream } from "../../../core/dispatch.js";
|
|
14
|
+
//# 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,6DAA6D;AAC7D,eAAO,MAAM,YAAY,gFAAwB,CAAC;AAClD,eAAO,MAAM,oBAAoB,+FAAgC,CAAC;AAClE,6DAA6D;AAC7D,eAAO,MAAM,wBAAwB,sFAAoC,CAAC;AAC1E,eAAO,MAAM,iBAAiB,0FAA6B,CAAC;AAC5D,0DAA0D;AAC1D,eAAO,MAAM,OAAO,qBAAmB,CAAC;AACxC,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,21 @@
|
|
|
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
|
+
/** Synchronous counterpart; requires completed preload(). */
|
|
12
|
+
export const compressSync = bindings.compressSync;
|
|
13
|
+
export const createCompressStream = bindings.createCompressStream;
|
|
14
|
+
/** Synchronous counterpart; requires completed preload(). */
|
|
15
|
+
export const createCompressStreamSync = bindings.createCompressStreamSync;
|
|
16
|
+
export const compressionStream = bindings.compressionStream;
|
|
17
|
+
/** Initializes this independently loaded WASM subpath. */
|
|
18
|
+
export const preload = bindings.preload;
|
|
19
|
+
export const version = bindings.version;
|
|
20
|
+
export { CompressError } from "../../../core/types.js";
|
|
21
|
+
//# 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,OAAO,IAAI,CAAC,GAAG,CAAC,CACzC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;AAC1C,6DAA6D;AAC7D,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC;AAClD,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,oBAAoB,CAAC;AAClE,6DAA6D;AAC7D,MAAM,CAAC,MAAM,wBAAwB,GAAG,QAAQ,CAAC,wBAAwB,CAAC;AAC1E,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,iBAAiB,CAAC;AAC5D,0DAA0D;AAC1D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AACxC,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
Binary file
|