Skip to content

Instantly share code, notes, and snippets.

@jwhear
Created January 12, 2012 20:51
Show Gist options
  • Save jwhear/1603032 to your computer and use it in GitHub Desktop.
Save jwhear/1603032 to your computer and use it in GitHub Desktop.
JS Binary stream p1
Endianness = {
Little: 0,
Big: 1
};
BinaryStream = function(source){
this.source = source;
this.cursor = 0;
this.byteOrder = Endianness.Little;
this.eof = function(){ return this.cursor >= this.source.length; };
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment