Stefan Westerfeld dixit: >Now the problem is that for those files I cannot predict the size. Often they >will be quite small, but they also could be 100 MB in size or more. So I use >xz -9 to get the best compression.
>Would it be possible to not allocate/initialize all the memory at startup? I think you mis-understood xz here. xz always uses 674 MiB to compress at -9 level, no matter the size of the input. In real-world scenarios, I found 'xz -2e' the best; for your case (where the data is uncompressed exactly once) I'd say 'xz -2' or maybe 'xz -3'. bye, //mirabilos -- “Having a smoking section in a restaurant is like having a peeing section in a swimming pool.” -- Edward Burr