@transmute/compressable-bitstring
v0.7.0-unstable.82
Published
``` npm i @transmute/compressable-bitstring@latest --save ```
Downloads
1,495
Readme
@transmute/compressable-bitstring
npm i @transmute/compressable-bitstring@latest --save
Usage
import { Bitstring } from '@transmute/compressable-bitstring';
const bitstring = new Bitstring({ length: 8 });
bitstring.set(4, true);
expect(bitstring.get(3)).toBe(false);
expect(bitstring.get(4)).toBe(true);
expect(await bitstring.encodeBits()).toBe('H4sIAAAAAAAAAxMAAOn_tc8BAAAA');
About
This module is based on / interoperable with digitalbazaar/bitstring.