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)
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)