mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-09-22 23:15:20 +00:00
Minor cleanup
This commit is contained in:
@@ -94,14 +94,14 @@ namespace SharpCompress.Writer.Zip
|
||||
byte[] encodedFilename = ArchiveEncoding.Default.GetBytes(filename);
|
||||
|
||||
OutputStream.Write(BitConverter.GetBytes(ZipHeaderFactory.ENTRY_HEADER_BYTES), 0, 4);
|
||||
if(explicitZipCompressionInfo.Compression == ZipCompressionMethod.Deflate)
|
||||
{
|
||||
OutputStream.Write(new byte[] {20, 0}, 0, 2); //version
|
||||
}
|
||||
else
|
||||
{
|
||||
OutputStream.Write(new byte[] {63, 0}, 0, 2); //version
|
||||
}
|
||||
if (explicitZipCompressionInfo.Compression == ZipCompressionMethod.Deflate)
|
||||
{
|
||||
OutputStream.Write(new byte[] {20, 0}, 0, 2); //older version which is more compatible
|
||||
}
|
||||
else
|
||||
{
|
||||
OutputStream.Write(new byte[] {63, 0}, 0, 2); //version says we used PPMd or LZMA
|
||||
}
|
||||
HeaderFlags flags = ArchiveEncoding.Default == Encoding.UTF8 ? HeaderFlags.UTF8 : (HeaderFlags)0;
|
||||
if (!OutputStream.CanSeek)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user