Skip to content

Latest commit

 

History

History
47 lines (31 loc) · 750 Bytes

README.md

File metadata and controls

47 lines (31 loc) · 750 Bytes

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