Skip to content

msmiley/lzh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lzh

Compression/Decompression using lzh/lzhuff

The Lempel-Ziv-Huffman algorithm was written by Haruyasu Yoshizaki 11/20/1988. It is relatively obscure but still shows up occasionally. This package currently only handles buffers with a 4-byte uncompressed-length header. The more complex headers which came later (LHA/LHarc) are not currently supported.

Currently broken for multiple decompress calls. Will fix shortly or send a PR.

Installation

$ npm install lzh

Usage

lzh = require('lzh')
x = lzh.compress(new Buffer("hello world"))
lzh.decompress(x).toString()

Testing

$ npm test

License

MIT