A big-endian extractor for groups of bits.
bit-extract is a big-endian extractor for groups of bits. You give it a number, and it gives you the value of groups of bits, starting from the most significant end of the number.
If you have npm installed, just run
npm install bit-extract
var bit_extract = ;/* Set up a bit reader. Specify the value and how many bits it has. */var bx = ; // 305419896 is 0x12345678 hexadecimal/* Extract the bits */console;console;console;console;
use this to extract values from a buffer. The node.js buffer object can do this for you, and can probably do it much better than this can.