@hpcc-js/wasm-zstd
v1.8.0
Published
hpcc-js - WASM zstd
Maintainers
Readme
@hpcc-js/wasm-zstd
This package provides a WebAssembly wrapper around the Zstandard library. This provides efficient compression and decompression of data.
Installation
npm install @hpcc-js/wasm-zstdUsage
import { Zstd } from "@hpcc-js/wasm-zstd";
const zstd = await Zstd.load();
// Generate some "data"
const data = new Uint8Array(Array.from({ length: 100000 }, (_, i) => i % 256));
const compressed_data = zstd.compress(data);
const decompressed_data = zstd.decompress(compressed_data);