1.0.4 • Published 10 years ago

nybble v1.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

Nybble

Read bits from a buffer or octet array.

Installation

npm install nybble

Usage

nybble = require 'nybble'

buffer = nybble.bitBuffer [0xca, 0xfe]
a = buffer.readUnsigned 0, 4

# a should be equal to 0xa

readUnsigned(bitOffset, bitLength)

Returns the unsigned integer value.

readSigned(bitOffset, bitLength)

Returns the signed integer value.

readFloat(bitOffset)

Returns the single precision IEEE 754 float.

readDouble(bitOffset)

Returns the double precision IEEE 754 float.

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago