dylex / zip-stream

Haskell ZIP archive streaming processing using conduit
BSD 3-Clause "New" or "Revised" License
7 stars 8 forks source link

Interpret version field according to spec #2

Closed gkleen closed 6 years ago

gkleen commented 6 years ago

According to the specification the 2 byte long version field in the ZIP file header and central directory record is to be interpreted as two separate numbers – one specifying which OS the archive is trying to be compatible to, and one which specifies the minimum version number.

Currently the implementation interprets both numbers as one 16-bit word, which just happens to work, if the OS specifier is DOS (which is mapped to 0).


I believe we can simply ignore the OS specifier (which is what this PR does) and label archives we create as DOS-compatible (analogous to the behaviour of the zip-utility on *NIX)