JavaScript pack("d") - binary strings - Stack Overflow

I'm trying to replicate the Perl and PHP style pack and unpack functions in JavaScript.Unsigned in

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 puter 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.

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 puter 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.

Share Improve this question asked Mar 18, 2010 at 8:35 Tim WhitlockTim Whitlock 1,1119 silver badges17 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

Here is an existing solution: http://phpjs/functions/pack:880

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745317711a4622294.html

相关推荐

  • JavaScript pack("d") - binary strings - Stack Overflow

    I'm trying to replicate the Perl and PHP style pack and unpack functions in JavaScript.Unsigned in

    7小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信