Java 或 C++与 Preon 等效吗?
Preon 是一个用于创建二进制编解码器的 Java 库:您只需放置注释即可在类的数据成员中,关于它们与位字段的对应关系(例如,用于特定字段的位数),并且基于此类,库构建了一个 Codec 对象,该对象能够创建从类读取其数据的实例。二进制输入流。
由于许可问题(它是在 GPL 下分发的),我无法使用它。
Java 或 C++ 中是否有具有等效或类似功能的库?
Preon is a Java library meant for creating binary codecs: you simply place annotations in a class' data members regarding their correspondence with bit fields (e.g. number of bits to use for certain field) and, based on such class, the library builds a Codec object that is able to create instances of the class reading their data from a binary input stream.
Due to licensing issues (it is distributed under GPL), I cannot use it.
Are there any libraries with equivalent or similar functionality, either in Java or in C++?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
查看 许可证 页面,preon 库是“GNU 通用公共许可证,版本 2,带有类路径例外” ”,这一点很重要。这允许您以二进制形式使用该库,您的应用程序也不是 GPL。
looking at the license page, the preon library is "GNU General Public License, version 2, with the Classpath Exception", which is important. that allows you to use the library in binary form without your application also being GPL.
看一下 Java 二进制块解析器库,它允许进行位字段解析并映射到类字段
Take a look at Java Binary Block Parser library, it allows to make bit field parsing and mapping to class fields