Language : C++
I am working on Bit Packing (Extracting the required bits from the given data and packing them in a char*) . My code currently supports :
– Integers
– Characters
– Strings
Now if I have to store the required bits of a structure, how should I go about it ? I mean what should I expect as input parameters for a generalized code w.r.t structures ?
The question may be vague and I am not expecting direct answers, even hints and pointers are appreciated.
Have a look at this for a very packed format or use an standard marshalling format such as json, xml, boost serialization,… and save yourself the grey hair.