Read and write gzip files easily.

Adam D. Ruppe destructionator at gmail.com
Wed Feb 19 20:03:44 PST 2014


On Thursday, 20 February 2014 at 03:58:01 UTC, Kamil Slowikowski 
wrote:
>     auto compressed = comp.compress(mem.data);
>     //comp.flush(); // Does not fix the problem.

You need to write each compressed block and the flush. So more 
like:

writeToFile(comp.compress(mem.data)); // loop over all the data 
btw
writeToFile(comp.flush());

and that should do it.


flush returns the remainder of the data.


More information about the Digitalmars-d mailing list