packf is a small binary serialization library for C/C++. It provides packf
, unpackf
and their vpackf
/vunpackf
variants to convert data structures to and from network byte order using a format string similar to sprintf
or sscanf
. The library is released into the public domain and can be used freely in any project.
packf 是一个用于 C/C++ 的轻量级二进制序列化库。通过类似 sprintf
/sscanf
的格式化字符串,packf
、unpackf
以及对应的 vpackf
、vunpackf
可以方便地在本地字节序和网络字节序之间转换结构体或数组等数据。该库采用公有领域许可,可在任何场合下免费使用。