This is a simplified fork of Nathan Rugg's package.
The goal of this fork is to simplify and extract the minimal implementation for my second project, I'm also trying to add as many typings as possible.
npm registry
npm install lzma1
GitHub
# same as latest released npm registry version
npm install xseman/lzma1#master
# latest unreleased changes
npm install xseman/lzma1#develop
# specific tag version
npm install xseman/lzma1#0.0.1
compress(data: string | Uint8Array, mode?: Mode): Int8Array
decompress(bytearray: Uint8Array): Int8Array
Compress and decompress a string with compression level 1.
import { compress, decompress } from "lzma1";
const data = "Hello World!";
const compressed = compress(data, 1);
const decompressed = decompress(result);
// data === decompressed