packbits

1.0.1 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    2
  • 1.0.0
    1

Package Sidebar

Install

npm i packbits

Weekly Downloads

3

Version

1.0.1

License

MIT

Last publish

Collaborators

  • dave-irvine