Wednesday, June 5, 2024
 Popular · Latest · Hot · Upcoming
84
rated 0 times [  88] [ 4]  / answers: 1 / hits: 30247  / 13 Years ago, sat, april 9, 2011, 12:00:00

Are there any modules that provide pack / unpack functionality for nodejs similar to python's struct module? I haven't found any specifically for node, and I'd assume that javascript implementations would be significantly slower.



Thanks.


More From » struct

 Answers
250

https://github.com/pgriess/node-jspack appears to be a straight-up port of Python's struct API for packing binary data, but it's implemented in JS. It doesn't appear to be packaged for npm yet.



https://github.com/substack/node-binary provides unpacking, also implemented in JS, and you can install it with npm install binary if you have npm installed.


[#92837] Thursday, April 7, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
noel

Total Points: 49
Total Questions: 90
Total Answers: 104

Location: Aland Islands
Member since Wed, Nov 17, 2021
3 Years ago
;