Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
bit-buffers
Advanced tools
Readme
A simple bit buffer (bit-string) implementation with base64 zlib compressed bitstring support.
import { BitBuffer } from "bit-buffers"
// BitBuffers are immutable and default to 16kb capacity by default.
const bits = new BitBuffer()
// To create a smaller BitBuffer, you can pass in a smaller capacity, for
// example this will create a BitBuffer with 16 bytes:
// const smallerBits = new BitBuffer(16 * 8)
// set bit 7 to 1.
const bits2 = bits.set(7) // => bits
bits2.test(7) // => true
// unset bit 7 to 0
const bits3 = bits2.unset(7) // => bits
bits3.test(7) // => false
const bits4 = bits3.set(3)
const bitstring = bits4.toBitstring() // => "eJwTYEAFAAEQABE="
const bits5 = BitBuffer.fromBitstring(bitstring)
bits5 === bits4 // true
const indexArray = bits5.toIndexArray() // => [3]
const bits6 = BitBuffer.fromIndexArray(indexArray)
bits6 === bits5 // => true
npm run build
npm test
npm run lint
npm run type-check
This project is maintained and funded by M2 Labs, a Web3 product development studio.
FAQs
A simple bit buffer (bit-string) implementation with base64 zlib compressed bitstring support.
The npm package bit-buffers receives a total of 3 weekly downloads. As such, bit-buffers popularity was classified as not popular.
We found that bit-buffers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.