Skip to content

Commit

Permalink
Merge pull request #236 from damieng/zip-min-version-of-20
Browse files Browse the repository at this point in the history
Default zip ver to 20 (deflate/encyption), fixes #164
  • Loading branch information
adamhathcock authored May 22, 2017
2 parents 60370b8 + 575f10f commit 3b73464
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SharpCompress/Writers/Zip/ZipCentralDirectoryEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ internal uint Write(Stream outputStream, ZipCompressionMethod compression)
var decompressedvalue = zip64 ? uint.MaxValue : (uint)Decompressed;
var headeroffsetvalue = zip64 ? uint.MaxValue : (uint)HeaderOffset;
var extralength = zip64 ? (2 + 2 + 8 + 8 + 8 + 4) : 0;
var version = (byte)(zip64 ? 45 : 10);
var version = (byte)(zip64 ? 45 : 20); // Version 20 required for deflate/encryption

HeaderFlags flags = HeaderFlags.UTF8;
if (!outputStream.CanSeek)
Expand Down

0 comments on commit 3b73464

Please sign in to comment.