[PR #97] [MERGED] Add explicit compressioninfo when writing file to zip #830

Closed
opened 2026-01-29 22:17:46 +00:00 by claunia · 0 comments
Owner

📋 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: masterHead: natanasova/add-explicit-compressioninfo


📝 Commits (1)

  • 66816ce Add 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.

## 📋 Pull Request Information **Original PR:** https://github.com/adamhathcock/sharpcompress/pull/97 **Author:** [@nadyaA](https://github.com/nadyaA) **Created:** 10/1/2015 **Status:** ✅ Merged **Merged:** 10/1/2015 **Merged by:** [@adamhathcock](https://github.com/adamhathcock) **Base:** `master` ← **Head:** `natanasova/add-explicit-compressioninfo` --- ### 📝 Commits (1) - [`66816ce`](https://github.com/adamhathcock/sharpcompress/commit/66816ce390b801b66ee0a8a0aa4a9bdf7e9e7f85) Add explicit compressioninfo when writing file to zip ### 📊 Changes **7 files changed** (+68 additions, -48 deletions) <details> <summary>View changed files</summary> 📝 `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) </details> ### 📄 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 22:17:46 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#830