Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 579 Bytes

README.md

File metadata and controls

21 lines (17 loc) · 579 Bytes

This is mostly a POC and isn't used in production, you have been warned!

zstd in the browser, because why not? ;)

Build

$ git clone --recurse-submodules https://github.com/klausenbusk/zstd.js.git
$ cd zstd.js
$ make

Usage

const zstd = await ZSTD();

zstd.compress(<Uint8Array>, <compressionLevel>) <Uint8Array>
zstd.decompress(<Uint8Array>) <Uint8Array>
zstd.compressString(<string>, <compressionLevel>) <Uint8Array>
zstd.decompressString(<Uint8Array>) <string>

See also: example.html