Bitstream.js
var bits=new Bitstream();
bits.open();
write(0xff,2)
seek(0)
read(2)