node.js的pack / unpack函数 [英] pack / unpack functions for node.js
问题描述
是否有任何模块为nodejs提供类似于python结构模块的打包/解包功能?我没有找到任何专门的节点,我假设javascript实现会明显变慢。
谢谢。
struct
API的直接端口,用于打包二进制数据,但它是在JS中实现的。它似乎还没有为npm打包。 https://github.com/substack/node-binary 提供解包,也在JS中实现,您可以使用 npm install binary
安装它。你安装了npm。
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.
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.
这篇关于node.js的pack / unpack函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!