Avi Bahra wrote:
I have written some test for the different kind of serialization archives in my application. In the test below the only difference is the kind of archive used ( and use of ios::binary for the binary streams)
ANode:: ...test_node_tree_persistence_text file_size: 4014 ANode:: ...test_node_tree_persistence_binary file_size: 5351 ANode:: ...test_node_tree_persistence_portable_binary file_size: 2878
What I don't understand is why should the binary archive serialization file size be larger than text ?
Binary storage of a 32 bit int requires 32 bits even if the value is zero, whereas a zero in text(ascii) representation takes a byte for the 0 char and a byte for the separating space char. Jeff