Skip to content

Gzip

Use JSTime.gzipSync() to compress a Uint8Array with gzip.

const data = Buffer.from("Hello, world!");
const compressed = JSTime.gzipSync("Hello, world!");
// => Uint8Array
const decompressed = JSTime.gunzipSync(compressed);
// => Uint8Array

See Docs > API > Utils for more useful utilities.