Poco::FileInputStream inp("archive.zip", std::ios::binary);
if (inp.good()) {
try {
Poco::Zip::Decompress dec(inp, ".\\unpacked");
dec.decompressAllFiles();
} catch (Poco::Exception& ex) {}
}
Unpacking this archive works fine with several other Zip tools.
Hi,
I've encountered an issue using Decompress with some archives.
If the archived Deflate stream contains the end header byte sequence 50 4B 07 08 the AutoDetectStream assumes the end of compressed data and decompression fails.
Precondition for this to occur is the "General purpose bit flag" set to 0x08 (referring to field documented in https://en.wikipedia.org/wiki/Zip_(file_format)#File_headers)
Code I'm using:
I've attached an archive to reproduce the issue. contains_zip_compressed.zip
Unpacking this archive works fine with several other Zip tools.