Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Good examples, articles and books on marshalling [closed]

While working on a software protection library for smart card based dongle I realized I need to transfer some tree-like data structures back and forth between client application and code inside the dongle.

Well, when working with web services the technologies like XML-RPC or JSON-RPC are reasonable way to consider. However, that is not the case with embedded devices like smart cards. You need to use some binary formats to optimize memory usage and to achieve good performance.

I guess what I need is to implement some binary data marshaling algorithm. I don't like the idea of reinventing the whole wheel and I pretty sure there are great books, articles and examples on marshalling issues like these.

What would you recommend?

UPD. I am using C and C++ on Linux, but the question is about info on marshalling algorithms in general.

like image 406
ezpresso Avatar asked Jun 06 '11 23:06

ezpresso


1 Answers

You can look at ASN.1 as a general serialization solution. There are free books and and free implementations: asn1c, a2c, snacc.

But ASN.1 is a huge. Simpler protobuf or xdr can be good enough for your task.

like image 129
lazyden Avatar answered Oct 21 '22 02:10

lazyden