I have some questions regarding packed fields, and storing/serializing
data.
What i want to do essentially, is to store 4MB of data to a file.

The data i have comes as uint8_t (a byte) and i want to store these as
efficiently as possible.

I have been testing a variety of protobuf setups (four);
repeated uint32_t datastruct = 1;
repeated uint32_t datastruct = 1 [packed = true]

with both variants assigned 1-to-1 and both variants bitshifted 4
values into a uint32_t.

To my surprise the stored files are much larger than the original
data.
The best result i could achieve was 5.2MB for the 4MB data, which
really isnt that good.

Have i misunderstood something vital here?
I do realize that protobuf adds information to the packets, but 25%
increase is too much imho.

Thanks for your time.

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to