JavaScript pack("d") - binary strings
Posted
by Tim Whitlock
on Stack Overflow
See other posts from Stack Overflow
or by Tim Whitlock
Published on 2010-03-18T08:35:08Z
Indexed on
2010/03/18
8:41 UTC
Read the original article
Hit count: 192
JavaScript
|binary
I'm trying to replicate the Perl and PHP style pack and unpack functions in JavaScript.
Unsigned integers were easy enough, so my pack('n') and pack('N') are ok. But my lack of a computer science background is a hurdle now and I don't know where to start with pack('d') for packing JavaScript's standard floating point.
Is there a JavaScript library for this out there?
If not, is there a good resource where I can learn how to do this? I am fine with bitwise and binary level operations in JS, I just don't know where to start with the logic.
Thanks.
© Stack Overflow or respective owner