Java or C++ equivalents to Preon?

纵饮孤独 提交于 2020-01-12 07:32:39

问题


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++?


回答1:


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.




回答2:


Take a look at Java Binary Block Parser library, it allows to make bit field parsing and mapping to class fields



来源:https://stackoverflow.com/questions/6698740/java-or-c-equivalents-to-preon

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!