@hpcc-js/wasm-zstd
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

@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-zstd

Usage

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);

Reference

/@hpcc-js/wasm-zstd/

    Package Sidebar

    Install

    npm i @hpcc-js/wasm-zstd

    Weekly Downloads

    8

    Version

    1.2.1

    License

    Apache-2.0

    Unpacked Size

    184 kB

    Total Files

    10

    Last publish

    Collaborators

    • hpcc-js