Binary File Parsing revisited using Javascript(blog.vjeux.com)
blog.vjeux.com
Binary File Parsing revisited using Javascript
http://blog.vjeux.com/2011/javascript/binaryparser-unleash-javascript-power.html
3 comments
All the browsers use the correct order for non integer keys. So unless you name your key "123" it will work.
See this bug report for more lengthy details http://code.google.com/p/v8/issues/detail?id=164
See this bug report for more lengthy details http://code.google.com/p/v8/issues/detail?id=164
> Is this something that is guaranteed by javascript?
In theory? No. In practice? ... Still no, if you use delete.
https://developer.mozilla.org/en/JavaScript/Reference/Operat...
In theory? No. In practice? ... Still no, if you use delete.
https://developer.mozilla.org/en/JavaScript/Reference/Operat...
Also compare to Emacs' bindat package: http://www.gnu.org/software/emacs/elisp/html_node/Byte-Packi...
It seems that the seek & tell example from this blog post could mostly be implemented in bindat through the mere datatype definitions, as they allow for variable length sequences and for skip operations.
It seems that the seek & tell example from this blog post could mostly be implemented in bindat through the mere datatype definitions, as they allow for variable length sequences and for skip operations.
Not having int64/uint64 is kind of a deal-breaker for any such library. Which means, in JavaScript, a big integer library. I don't see one.
I haven't see much int64 in the binary files I've been working on so far. Do you have any examples?
It is possible to make an Integer64 class, the downside is the lack of ability to overload default operators such as +, *, < ... That is annoying but not deal-breaking
It is possible to make an Integer64 class, the downside is the lack of ability to overload default operators such as +, *, < ... That is annoying but not deal-breaking
Is this something that is guaranteed by javascript?