@kamyu/lz77
v1.0.0
Published
konmai lz77 compression
Downloads
4
Readme
Lz77-wasm
rust lz77 library built with wasm to be usable in nodejs.
Installation
npm i @kamyu/lz77
Build
Requirements
Command
npm run build
How to use?
parameter: Buffer or Uint8Array
return: Uint8Array
Javascript
const fs = require('fs');
const lz77 = require('@kamyu/lz77');
lz77.compress(fs.readFileSync('test.txt'));
lz77.decompress(fs.readFileSync('test.txt.lz77'));
Typescript
import * as fs from 'fs';
import * as lz77 from '@kamyu/lz77';
lz77.compress(fs.readFileSync('test.txt'));
lz77.decompress(fs.readFileSync('test.txt.lz77'));