Uncompressing gzip files?


#1

Trying to uncompress files compressed via gzip using GZIPDecompressorInputStream, but it doesn’t work at all. Any tip on compress method that works with GZIPDecompressorInputStream ?


#2

I think the format’s probably the same, but maybe there’s a header? You could always use zip files and the ZipFile class…


#3

Probably so. Going with the zip file. However, I have a request for ZipFile::uncompressTo . Since the destination can reside on a cached drive, you should do out->flush() so that the content is safely stored. Or at least add it as an option argument to ZipFile::uncompressTo.


#4

But it already deletes the stream that it uses, and that will flush it… Or am I misunderstanding you?


#5

Quite right, sorry Jules. Missed the flush() in the destructor.