Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
a very simple bitfield implementation using buffers
JavaScript
Branch: master
Pull request Compare This branch is 4 commits ahead, 48 commits behind fb55:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
index.js
package.json
readme.md

readme.md

BitField

PeerCDN Note: Our additions:

  • Google Closure annotations
  • Style changes

a very simple bitfield

npm install bitfield

Methods

BitField(data): Data can be either a buffer, WebGL Int8Array or numeric array, or a number representing the maximum number of supported bytes.

BitField#get(index): Returns a boolean indicating whether the bit is set.

BitField#set(index[, value]): Values defaults to true. Sets the bit to the boolean value of the value (true = 1, false = 0).

Properties

BitField#buffer: The contents of the BitField.

Something went wrong with that request. Please try again.