Skip to content

v1.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 18 May 20:54
· 33 commits to main since this release

The MongoDB Node.js team is pleased to announce version 1.0.0 of the zstd package!

Release Highlights

This library allows zstd compression in Node.js, which can compress and decompress buffers with various levels (1-22).

Usage

import { compress, decompress } from '@mongodb-js/zstd';

(async () => {
  const buffer = Buffer.from('test');
  const compressed = await compress(buffer, 10);
  const decompressed = await decompress(compressed);
})();

API

export function compress(buffer: Buffer | ArrayBuffer | Uint8Array, level: number): Promise<Buffer>
export function decompress(buffer: Buffer): Promise<Buffer>

Supported Platforms

node12 node14 node16 node17
Windows x64
macOS x64
macOS arm64
Linux x64 gnu
Linux arm gnu
Linux arm64 gnu