-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1026 from autonomys/feat/add-decompression-support
Add decompression support
- Loading branch information
Showing
8 changed files
with
107 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10301,6 +10301,11 @@ [email protected]: | |
resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz#96415c512d8e3ffd920afd3889604e30b9eaac15" | ||
integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ== | ||
|
||
zlibjs@^0.3.1: | ||
version "0.3.1" | ||
resolved "https://registry.yarnpkg.com/zlibjs/-/zlibjs-0.3.1.tgz#50197edb28a1c42ca659cc8b4e6a9ddd6d444554" | ||
integrity sha512-+J9RrgTKOmlxFSDHo0pI1xM6BLVUv+o0ZT9ANtCxGkjIVCCUdx9alUF8Gm+dGLKbkkkidWIHFDZHDMpfITt4+w== | ||
|
||
zod@^3.22.4: | ||
version "3.22.4" | ||
resolved "https://registry.yarnpkg.com/zod/-/zod-3.22.4.tgz#f31c3a9386f61b1f228af56faa9255e845cf3fff" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
declare module 'zlibjs/bin/zlib_and_gzip.min.js' { | ||
export namespace Zlib { | ||
enum CompressionType { | ||
NONE = 0, | ||
FIXED = 1, | ||
DYNAMIC = 2, | ||
} | ||
|
||
export namespace Gzip { | ||
interface Options { | ||
deflateOptions: { | ||
compressionType: Zlib.CompressionType | ||
} | ||
flags: { | ||
fname: boolean // use filename? | ||
comment: boolean // use comment? | ||
fhcrc: boolean // use file checksum? | ||
} | ||
filename: string // filename | ||
comment: string | ||
} | ||
} | ||
|
||
export namespace Deflate { | ||
interface Options { | ||
compressionType: CompressionType | ||
} | ||
} | ||
|
||
export namespace Inflate { | ||
enum BufferType { | ||
BLOCK = 0, | ||
ADAPTIVE = 1, | ||
} | ||
interface Options { | ||
index: number // start position in input buffer | ||
bufferSize: number // initial output buffer size | ||
bufferType: Zlib.Inflate.BufferType // buffer expantion type | ||
resize: boolean // resize buffer(ArrayBuffer) when end of decompression (default: false) | ||
verify: boolean // verify decompression result (default: false) | ||
} | ||
} | ||
|
||
export class Gzip { | ||
constructor(data: Array<number> | Uint8Array, options: Gzip.Options) | ||
public compress(): Uint8Array | ||
} | ||
|
||
export class Gunzip { | ||
constructor(data: Array<number> | Uint8Array) | ||
public decompress(): Uint8Array | ||
} | ||
|
||
export class Deflate { | ||
constructor(data: Array<number> | Uint8Array, options: Deflate.Options) | ||
public compress(): Uint8Array | ||
} | ||
|
||
export class Inflate { | ||
constructor(data: Array<number> | Uint8Array, options: Inflate.Options) | ||
public decompress(): Uint8Array | ||
} | ||
} | ||
} |