I am writing some objects using TFile. For some reason I don’t understand I get different compression ratios depending on whether the objects I am writing are created on the stack or the heap.
For example, if I use the following code:
bx_event* bx= new bx_event();
bx->set_event(prim, secondary);
bx->Write();
I find that my files are compressed with a very high factor (e.g., 44)
However, if I use the following code
bx_event bx;
bx.set_event(prim, secondary);
bx.Write();
I find my files have a very low compression of approximately 3.93.
Why should I get different behavior if I create my objects on the heap and write them or on the stack?
Do you have any ideas?
Thanks.
Jon