0.3.1 • Published 3 years ago

@imretro/bitio v0.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@imretro/bitio

npm CI codecov

I/O with bits

Examples

Reader

const { Reader } = require('@imretro/bitio');
const bytes = new Uint8Array([0xAB, 0xCD, 0xEF]);
const reader = new Reader(bytes);

console.log(reader.readBits(12)); // 2748 (0xABC)

Writer

const { Writer } = require('@imretro/bitio');
const dst = new Uint8Array(1);
const writer = new Writer(dst);
[1, 1, 1, 1, 0, 0, 0, 1].forEach((bit) => writer.writeBit(bit));

console.log(dst[0]); // 241 (0b11110001)

Documentation

0.3.0-minimal

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.8

3 years ago

0.3.1

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.1

3 years ago