in reply to binary data metamorphosis?

Show some code. How are you writng the compressed data to the file? How are you determining the size of the data in memory and in the file?