@whelton/react-native-zstd
TypeScript icon, indicating that this package has built-in type declarations

0.6.11 • Public • Published

react-native-zstd

ZSTD bindings for React-Native

Installation

npm install react-native-zstd

or

yarn add react-native-zstd

Usage

import { compress, decompress } from "react-native-zstd";
import { Buffer } from 'buffer';

// Compress
const compressionLevel: number = 3;
const compressed: Buffer = compress("Hello World!", compressionLevel);
console.log(compressed.toString('base64'))

// Decompress
const decompressed: string = decompress(compressed);
console.log(`decompressed: ${decompressed}`)

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

Package Sidebar

Install

npm i @whelton/react-native-zstd

Weekly Downloads

6

Version

0.6.11

License

MIT

Unpacked Size

3.69 MB

Total Files

212

Last publish

Collaborators

  • whelton