@gjsify/zlib 0.22.0 → 0.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import"./_virtual/_rolldown/runtime.js";import{Transform as e}from"@gjsify/stream/browser";const t={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,ZLIB_VERNUM:4784,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,ZSTD_COMPRESS:10,ZSTD_DECOMPRESS:11,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_PARAM_MODE:0,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_PARAM_LGWIN:2,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_PARAM_LGBLOCK:3,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8};function toUint8(e){return typeof e==`string`?new TextEncoder().encode(e):e instanceof Uint8Array?e:new Uint8Array(e)}function notSupportedError(e,t){return Object.assign(Error(`zlib.${e} is not supported in the browser (${t})`),{code:`ENOTSUP`,syscall:e})}async function runStream(e,t,n){let r=t===`compress`?globalThis.CompressionStream:globalThis.DecompressionStream;if(!r)throw Error(`zlib browser polyfill requires ${t===`compress`?`CompressionStream`:`DecompressionStream`} (not available in this browser)`);let i=new r(e),a=i.writable.getWriter(),o=i.readable.getReader();a.write(n).catch(()=>{}),a.close().catch(()=>{});let s=[],c=0;for(;;){let{done:e,value:t}=await o.read();if(e)break;let n=t;s.push(n),c+=n.length}let l=new Uint8Array(c),u=0;for(let e of s)l.set(e,u),u+=e.length;return l}function asyncOp(e,t){return(n,r,i)=>{let a=typeof r==`function`?r:i;if(typeof a!=`function`)throw TypeError(`callback is required`);runStream(e,t,toUint8(n)).then(e=>a(null,e),e=>a(e))}}function syncOp(e,t,n){return(e,t)=>{throw notSupportedError(n,`CompressionStream is async-only — use the callback form`)}}function unsupportedAsyncOp(e,t){return(n,r,i)=>{let a=typeof r==`function`?r:i;if(typeof a!=`function`)throw TypeError(`callback is required`);let o=notSupportedError(e,`${t} is not in the WHATWG Compression Streams spec`);queueMicrotask(()=>a(o))}}function unsupportedSyncOp(e,t){return(n,r)=>{throw notSupportedError(e,`${t} is not in the WHATWG Compression Streams spec`)}}const n=asyncOp(`gzip`,`compress`),r=asyncOp(`gzip`,`decompress`),i=asyncOp(`deflate`,`compress`),a=asyncOp(`deflate`,`decompress`),o=asyncOp(`deflate-raw`,`compress`),s=asyncOp(`deflate-raw`,`decompress`),c=unsupportedAsyncOp(`brotliCompress`,`brotli`),l=unsupportedAsyncOp(`brotliDecompress`,`brotli`),u=unsupportedAsyncOp(`zstdCompress`,`zstd`),d=unsupportedAsyncOp(`zstdDecompress`,`zstd`),f=syncOp(`gzip`,`compress`,`gzipSync`),p=syncOp(`gzip`,`decompress`,`gunzipSync`),m=syncOp(`deflate`,`compress`,`deflateSync`),h=syncOp(`deflate`,`decompress`,`inflateSync`),g=syncOp(`deflate-raw`,`compress`,`deflateRawSync`),_=syncOp(`deflate-raw`,`decompress`,`inflateRawSync`),v=unsupportedSyncOp(`brotliCompressSync`,`brotli`),y=unsupportedSyncOp(`brotliDecompressSync`,`brotli`),b=unsupportedSyncOp(`zstdCompressSync`,`zstd`),x=unsupportedSyncOp(`zstdDecompressSync`,`zstd`);var ZlibTransform=class extends e{_format;_direction;_chunks=[];constructor(e,t){super(),this._format=e,this._direction=t}_transform(e,t,n){this._chunks.push(toUint8(e)),n(null)}_flush(e){let t=this._chunks.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let e of this._chunks)n.set(e,r),r+=e.length;runStream(this._format,this._direction,n).then(t=>{this.push(t),e()},t=>e(t))}},Gzip=class extends ZlibTransform{constructor(){super(`gzip`,`compress`)}},Gunzip=class extends ZlibTransform{constructor(){super(`gzip`,`decompress`)}},Deflate=class extends ZlibTransform{constructor(){super(`deflate`,`compress`)}},Inflate=class extends ZlibTransform{constructor(){super(`deflate`,`decompress`)}},DeflateRaw=class extends ZlibTransform{constructor(){super(`deflate-raw`,`compress`)}},InflateRaw=class extends ZlibTransform{constructor(){super(`deflate-raw`,`decompress`)}},BrotliCompress=class extends e{constructor(){throw super(),notSupportedError(`BrotliCompress`,`brotli is not in the WHATWG Compression Streams spec`)}},BrotliDecompress=class extends e{constructor(){throw super(),notSupportedError(`BrotliDecompress`,`brotli is not in the WHATWG Compression Streams spec`)}};const createGzip=e=>new Gzip,createGunzip=e=>new Gunzip,createDeflate=e=>new Deflate,createInflate=e=>new Inflate,createDeflateRaw=e=>new DeflateRaw,createInflateRaw=e=>new InflateRaw,createBrotliCompress=e=>new BrotliCompress,createBrotliDecompress=e=>new BrotliDecompress,createUnzip=e=>new Gunzip,S={constants:t,gzip:n,gunzip:r,deflate:i,inflate:a,deflateRaw:o,inflateRaw:s,brotliCompress:c,brotliDecompress:l,zstdCompress:u,zstdDecompress:d,gzipSync:f,gunzipSync:p,deflateSync:m,inflateSync:h,deflateRawSync:g,inflateRawSync:_,brotliCompressSync:v,brotliDecompressSync:y,zstdCompressSync:b,zstdDecompressSync:x,Gzip,Gunzip,Deflate,Inflate,DeflateRaw,InflateRaw,BrotliCompress,BrotliDecompress,createGzip,createGunzip,createDeflate,createInflate,createDeflateRaw,createInflateRaw,createBrotliCompress,createBrotliDecompress,createUnzip};export{BrotliCompress,BrotliDecompress,Deflate,DeflateRaw,Gunzip,Gzip,Inflate,InflateRaw,c as brotliCompress,v as brotliCompressSync,l as brotliDecompress,y as brotliDecompressSync,t as constants,createBrotliCompress,createBrotliDecompress,createDeflate,createDeflateRaw,createGunzip,createGzip,createInflate,createInflateRaw,createUnzip,S as default,i as deflate,o as deflateRaw,g as deflateRawSync,m as deflateSync,r as gunzip,p as gunzipSync,n as gzip,f as gzipSync,a as inflate,s as inflateRaw,_ as inflateRawSync,h as inflateSync,u as zstdCompress,b as zstdCompressSync,d as zstdDecompress,x as zstdDecompressSync};
1
+ import"./_virtual/_rolldown/runtime.js";import{Transform as e}from"@gjsify/stream/browser";const t={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,ZLIB_VERNUM:4784,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,ZSTD_COMPRESS:10,ZSTD_DECOMPRESS:11,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_PARAM_MODE:0,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_PARAM_LGWIN:2,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_PARAM_LGBLOCK:3,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8};function toUint8(e){return typeof e==`string`?new TextEncoder().encode(e):e instanceof Uint8Array?e:new Uint8Array(e)}function notSupportedError(e,t){return Object.assign(Error(`zlib.${e} is not supported in the browser (${t})`),{code:`ENOTSUP`,syscall:e})}async function runStream(e,t,n){let r=t===`compress`?globalThis.CompressionStream:globalThis.DecompressionStream;if(!r)throw Error(`zlib browser polyfill requires ${t===`compress`?`CompressionStream`:`DecompressionStream`} (not available in this browser)`);let i=new r(e),a=i.writable.getWriter(),o=i.readable.getReader();a.write(n).catch(()=>{}),a.close().catch(()=>{});let s=[],c=0;for(;;){let{done:e,value:t}=await o.read();if(e)break;let n=t;s.push(n),c+=n.length}let l=new Uint8Array(c),u=0;for(let e of s)l.set(e,u),u+=e.length;return l}function asyncOp(e,t){return(n,r,i)=>{let a=typeof r==`function`?r:i;if(typeof a!=`function`)throw TypeError(`callback is required`);runStream(e,t,toUint8(n)).then(e=>a(null,e),e=>a(e))}}function syncOp(e,t,n){return(e,t)=>{throw notSupportedError(n,`CompressionStream is async-only — use the callback form`)}}function unsupportedAsyncOp(e,t){return(n,r,i)=>{let a=typeof r==`function`?r:i;if(typeof a!=`function`)throw TypeError(`callback is required`);let o=notSupportedError(e,`${t} is not in the WHATWG Compression Streams spec`);queueMicrotask(()=>a(o))}}function unsupportedSyncOp(e,t){return(n,r)=>{throw notSupportedError(e,`${t} is not in the WHATWG Compression Streams spec`)}}const n=asyncOp(`gzip`,`compress`),r=asyncOp(`gzip`,`decompress`),i=asyncOp(`deflate`,`compress`),a=asyncOp(`deflate`,`decompress`),o=asyncOp(`deflate-raw`,`compress`),s=asyncOp(`deflate-raw`,`decompress`),c=unsupportedAsyncOp(`brotliCompress`,`brotli`),l=unsupportedAsyncOp(`brotliDecompress`,`brotli`),u=unsupportedAsyncOp(`zstdCompress`,`zstd`),d=unsupportedAsyncOp(`zstdDecompress`,`zstd`),f=syncOp(`gzip`,`compress`,`gzipSync`),p=syncOp(`gzip`,`decompress`,`gunzipSync`),m=syncOp(`deflate`,`compress`,`deflateSync`),h=syncOp(`deflate`,`decompress`,`inflateSync`),g=syncOp(`deflate-raw`,`compress`,`deflateRawSync`),_=syncOp(`deflate-raw`,`decompress`,`inflateRawSync`),v=unsupportedSyncOp(`brotliCompressSync`,`brotli`),y=unsupportedSyncOp(`brotliDecompressSync`,`brotli`),b=unsupportedSyncOp(`zstdCompressSync`,`zstd`),x=unsupportedSyncOp(`zstdDecompressSync`,`zstd`);var ZlibTransform=class extends e{_format;_direction;_chunks=[];constructor(e,t){super(),this._format=e,this._direction=t}_resolveFormat(e){return this._format}_transform(e,t,n){this._chunks.push(toUint8(e)),n(null)}_flush(e){let t=this._chunks.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let e of this._chunks)n.set(e,r),r+=e.length;runStream(this._resolveFormat(n),this._direction,n).then(t=>{this.push(t),e()},t=>e(t))}},Gzip=class extends ZlibTransform{constructor(){super(`gzip`,`compress`)}},Gunzip=class extends ZlibTransform{constructor(){super(`gzip`,`decompress`)}},Deflate=class extends ZlibTransform{constructor(){super(`deflate`,`compress`)}},Inflate=class extends ZlibTransform{constructor(){super(`deflate`,`decompress`)}},DeflateRaw=class extends ZlibTransform{constructor(){super(`deflate-raw`,`compress`)}},InflateRaw=class extends ZlibTransform{constructor(){super(`deflate-raw`,`decompress`)}},Unzip=class extends ZlibTransform{constructor(){super(`gzip`,`decompress`)}_resolveFormat(e){return e.length>=2&&e[0]===31&&e[1]===139?`gzip`:`deflate`}},ZstdCompress=class extends e{constructor(){super();let e=Error(`ZstdCompress is not supported in the browser (no Zstd CompressionStream)`);throw e.code=`ERR_UNSUPPORTED_OPERATION`,e}},ZstdDecompress=class extends e{constructor(){super();let e=Error(`ZstdDecompress is not supported in the browser (no Zstd DecompressionStream)`);throw e.code=`ERR_UNSUPPORTED_OPERATION`,e}},BrotliCompress=class extends e{constructor(){throw super(),notSupportedError(`BrotliCompress`,`brotli is not in the WHATWG Compression Streams spec`)}},BrotliDecompress=class extends e{constructor(){throw super(),notSupportedError(`BrotliDecompress`,`brotli is not in the WHATWG Compression Streams spec`)}};const createGzip=e=>new Gzip,createGunzip=e=>new Gunzip,createDeflate=e=>new Deflate,createInflate=e=>new Inflate,createDeflateRaw=e=>new DeflateRaw,createInflateRaw=e=>new InflateRaw,createBrotliCompress=e=>new BrotliCompress,createBrotliDecompress=e=>new BrotliDecompress,createUnzip=e=>new Unzip,createZstdCompress=e=>new ZstdCompress,createZstdDecompress=e=>new ZstdDecompress,S={constants:t,gzip:n,gunzip:r,deflate:i,inflate:a,deflateRaw:o,inflateRaw:s,brotliCompress:c,brotliDecompress:l,zstdCompress:u,zstdDecompress:d,gzipSync:f,gunzipSync:p,deflateSync:m,inflateSync:h,deflateRawSync:g,inflateRawSync:_,brotliCompressSync:v,brotliDecompressSync:y,zstdCompressSync:b,zstdDecompressSync:x,Gzip,Gunzip,Deflate,Inflate,DeflateRaw,InflateRaw,BrotliCompress,BrotliDecompress,Unzip,ZlibTransform,ZstdCompress,ZstdDecompress,createGzip,createGunzip,createDeflate,createInflate,createDeflateRaw,createInflateRaw,createBrotliCompress,createBrotliDecompress,createUnzip,createZstdCompress,createZstdDecompress};export{BrotliCompress,BrotliDecompress,Deflate,DeflateRaw,Gunzip,Gzip,Inflate,InflateRaw,Unzip,ZlibTransform,ZstdCompress,ZstdDecompress,c as brotliCompress,v as brotliCompressSync,l as brotliDecompress,y as brotliDecompressSync,t as constants,createBrotliCompress,createBrotliDecompress,createDeflate,createDeflateRaw,createGunzip,createGzip,createInflate,createInflateRaw,createUnzip,createZstdCompress,createZstdDecompress,S as default,i as deflate,o as deflateRaw,g as deflateRawSync,m as deflateSync,r as gunzip,p as gunzipSync,n as gzip,f as gzipSync,a as inflate,s as inflateRaw,_ as inflateRawSync,h as inflateSync,u as zstdCompress,b as zstdCompressSync,d as zstdDecompress,x as zstdDecompressSync};
@@ -99,11 +99,17 @@ export declare const brotliCompressSync: (_data: string | Uint8Array | ArrayBuff
99
99
  export declare const brotliDecompressSync: (_data: string | Uint8Array | ArrayBuffer, _opts?: ZlibOptions) => Uint8Array;
100
100
  export declare const zstdCompressSync: (_data: string | Uint8Array | ArrayBuffer, _opts?: ZlibOptions) => Uint8Array;
101
101
  export declare const zstdDecompressSync: (_data: string | Uint8Array | ArrayBuffer, _opts?: ZlibOptions) => Uint8Array;
102
- declare class ZlibTransform extends Transform {
103
- private _format;
102
+ export declare class ZlibTransform extends Transform {
103
+ protected _format: WebCompressionFormat;
104
104
  private _direction;
105
105
  private _chunks;
106
106
  constructor(format: WebCompressionFormat, direction: 'compress' | 'decompress');
107
+ /**
108
+ * Format to use for the buffered input. Overridable so `Unzip` can pick
109
+ * between gzip and zlib-wrapped deflate once it has seen the header —
110
+ * which is only possible because `_flush` already buffers the whole input.
111
+ */
112
+ protected _resolveFormat(_input: Uint8Array): WebCompressionFormat;
107
113
  _transform(chunk: unknown, _enc: string, cb: (err: Error | null, data?: unknown) => void): void;
108
114
  _flush(cb: (err?: Error | null) => void): void;
109
115
  }
@@ -125,6 +131,28 @@ export declare class DeflateRaw extends ZlibTransform {
125
131
  export declare class InflateRaw extends ZlibTransform {
126
132
  constructor();
127
133
  }
134
+ /**
135
+ * Node's `Unzip` accepts EITHER gzip or zlib-wrapped deflate and picks by
136
+ * inspecting the header. The Web API has no such auto-detecting format, but it
137
+ * does not need one: `_flush` already buffers the entire input before handing
138
+ * it to `DecompressionStream`, so the header is in hand at the only moment the
139
+ * format has to be chosen.
140
+ *
141
+ * Note `'deflate'` in the WHATWG vocabulary is the ZLIB-wrapped form (RFC 1950)
142
+ * — `'deflate-raw'` is the unwrapped one — so it is the correct partner to gzip
143
+ * here. Input that is neither surfaces as a `DecompressionStream` error, which
144
+ * is what Node does too.
145
+ */
146
+ export declare class Unzip extends ZlibTransform {
147
+ constructor();
148
+ protected _resolveFormat(input: Uint8Array): WebCompressionFormat;
149
+ }
150
+ export declare class ZstdCompress extends Transform {
151
+ constructor();
152
+ }
153
+ export declare class ZstdDecompress extends Transform {
154
+ constructor();
155
+ }
128
156
  export declare class BrotliCompress extends Transform {
129
157
  constructor();
130
158
  }
@@ -139,7 +167,9 @@ export declare const createDeflateRaw: (_opts?: ZlibOptions) => DeflateRaw;
139
167
  export declare const createInflateRaw: (_opts?: ZlibOptions) => InflateRaw;
140
168
  export declare const createBrotliCompress: (_opts?: ZlibOptions) => BrotliCompress;
141
169
  export declare const createBrotliDecompress: (_opts?: ZlibOptions) => BrotliDecompress;
142
- export declare const createUnzip: (_opts?: ZlibOptions) => Gunzip;
170
+ export declare const createUnzip: (_opts?: ZlibOptions) => Unzip;
171
+ export declare const createZstdCompress: (_opts?: ZlibOptions) => never;
172
+ export declare const createZstdDecompress: (_opts?: ZlibOptions) => never;
143
173
  declare const zlibDefault: {
144
174
  constants: {
145
175
  readonly Z_NO_FLUSH: 0;
@@ -246,6 +276,10 @@ declare const zlibDefault: {
246
276
  InflateRaw: typeof InflateRaw;
247
277
  BrotliCompress: typeof BrotliCompress;
248
278
  BrotliDecompress: typeof BrotliDecompress;
279
+ Unzip: typeof Unzip;
280
+ ZlibTransform: typeof ZlibTransform;
281
+ ZstdCompress: typeof ZstdCompress;
282
+ ZstdDecompress: typeof ZstdDecompress;
249
283
  createGzip: (_opts?: ZlibOptions) => Gzip;
250
284
  createGunzip: (_opts?: ZlibOptions) => Gunzip;
251
285
  createDeflate: (_opts?: ZlibOptions) => Deflate;
@@ -254,6 +288,8 @@ declare const zlibDefault: {
254
288
  createInflateRaw: (_opts?: ZlibOptions) => InflateRaw;
255
289
  createBrotliCompress: (_opts?: ZlibOptions) => BrotliCompress;
256
290
  createBrotliDecompress: (_opts?: ZlibOptions) => BrotliDecompress;
257
- createUnzip: (_opts?: ZlibOptions) => Gunzip;
291
+ createUnzip: (_opts?: ZlibOptions) => Unzip;
292
+ createZstdCompress: (_opts?: ZlibOptions) => never;
293
+ createZstdDecompress: (_opts?: ZlibOptions) => never;
258
294
  };
259
295
  export default zlibDefault;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/zlib",
3
- "version": "0.22.0",
3
+ "version": "0.24.1",
4
4
  "description": "Node.js zlib module for Gjs",
5
5
  "module": "lib/esm/index.js",
6
6
  "types": "lib/types/index.d.ts",
@@ -40,12 +40,12 @@
40
40
  "dependencies": {
41
41
  "@girs/gio-2.0": "^4.1.0",
42
42
  "@girs/glib-2.0": "^4.1.0",
43
- "@gjsify/stream": "^0.22.0"
43
+ "@gjsify/stream": "^0.24.1"
44
44
  },
45
45
  "devDependencies": {
46
- "@gjsify/cli": "^0.22.0",
47
- "@gjsify/unit": "^0.22.0",
48
- "@gjsify/util": "^0.22.0",
46
+ "@gjsify/cli": "^0.24.1",
47
+ "@gjsify/unit": "^0.24.1",
48
+ "@gjsify/util": "^0.24.1",
49
49
  "@types/node": "^25.9.2",
50
50
  "typescript": "^6.0.3"
51
51
  },