1
我需要解码通过像本实施例中的结构所表示的二进制数据(C#):解码二进制协议消息
struct Message
{
byte id;
int type;
bool valid;
}
和实施例的二进制数据:0x040000000201其中id = 4,类型= 2,valid = true;
我可以使用Thrift,Protocol Buffers或任何其他工具来解码未由相同工具编码的二进制数据吗? 你可以提供任何有关如何做到这一点?
谢谢
查看所选答案http://stackoverflow.com/questions/2480116/marshalling-a-big-endian-byte-collection-into-a-struct-in-order-to-pull-out-valu – Matthew 2012-03-09 18:59:45