Skip to content

Compress with nonseekable #335

@s0li

Description

@s0li

When I try to create a zip file and set seekableOut argument of Compress ctor to false the result file is corrupted.

Poco::Zip::Compress c(out, false); /* seekableOut = false /
...
compressor.addFile(anEntry, anEntry); /
Compression level = MAX, Compression Algorithm = DEFLATE */

Looking at the resulting zip file in hex-editor I can see the following things that are wrong:

  1. general purpose bit flag in Central directory is invalid - it should be [0A 00], instead it is [00 02]
  2. crc, compressed size, uncompressed size in central directory are all zeros.
  3. For one of the files in the zip file (I compressed two files) the local header offset in the central directory was invalid.
  4. central directory offset is invalid.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions