Skip to content

dave-irvine/packbits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

packbits

An implementation of the PackBits algorithm.

Installation

npm install packbits

Usage

var packbits = require('packbits');

Encode or decode a string of hex bytes with or without separating spaces.

encode

packbits.encode('AA AA AA 80 00 2A AA AA AA AA 80 00 2A 22 AA AA AA AA AA AA AA AA AA AA');
//-> FEAA0280002AFDAA0380002A22F7AA

decode

packbits.decode('FE AA 02 80 00 2A FD AA 03 80 00 2A 22 F7 AA');
//-> AAAAAA80002AAAAAAAAA80002A22AAAAAAAAAAAAAAAAAAAA

Examples

See examples/ directory

About

An implementation of the PackBits algorithm.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published