mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
[PR #97] [MERGED] Add explicit compressioninfo when writing file to zip #830
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/adamhathcock/sharpcompress/pull/97
Author: @nadyaA
Created: 10/1/2015
Status: ✅ Merged
Merged: 10/1/2015
Merged by: @adamhathcock
Base:
master← Head:natanasova/add-explicit-compressioninfo📝 Commits (1)
66816ceAdd explicit compressioninfo when writing file to zip📊 Changes
7 files changed (+68 additions, -48 deletions)
View changed files
📝
SharpCompress/SharpCompress.Portable.csproj(+1 -0)📝
SharpCompress/SharpCompress.PortableTest.csproj(+1 -0)📝
SharpCompress/SharpCompress.Unsigned.csproj(+1 -0)📝
SharpCompress/SharpCompress.WindowsStore.csproj(+1 -0)📝
SharpCompress/SharpCompress.csproj(+1 -0)➕
SharpCompress/Writer/Zip/ZipCompressionInfo.cs(+47 -0)📝
SharpCompress/Writer/Zip/ZipWriter.cs(+16 -48)📄 Description
We use the ZipWriter to create archive with compression type deflate. But there is a problem - the default Mac UI unzipping (double click on the zip file) is throwing "Unable to expand. Error 2 No such file or directory." if there is an empty file in the archive. It only works for archives that store the empty files and do not compress them.
As this is not a general bug, but one tool issue, the solution for me is to provide the API with option to explicitly change the compression info for specific files. This way if there are empty files or other specifics one can have different compression infos in one archive.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.