bit-buffers
A simple bit buffer (bit-string) implementation with base64 zlib compressed bitstring support.
Usage
import { BitBuffer } from "bit-buffers"
const bits = new BitBuffer()
const bits2 = bits.set(7)
bits2.test(7)
const bits3 = bits2.unset(7)
bits3.test(7)
const bits4 = bits3.set(3)
const bitstring = bits4.toBitstring()
const bits5 = BitBuffer.fromBitstring(bitstring)
bits5 === bits4
const indexArray = bits5.toIndexArray()
const bits6 = BitBuffer.fromIndexArray(indexArray)
bits6 === bits5
Building
npm run build
Testing
npm test
Linting
npm run lint
Type-checking
npm run type-check
Brought to you by M2 Labs
This project is maintained and funded by M2 Labs, a Web3
product development studio.