Give ZipOutputStream an INameTransform property, and use it to transform the names of newly added entries #497
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ref: the discussions about name transforming/cleaning when creating zips:
An experiment into giving ZipOutputStream an INameTransform to (optionally) use to transform file paths, to see what it might look like.
A bit more heavyweight that just having a clean function to call, but more flexible (if that's useful), and fits in more with ZipFile and FastZip?
Defaults to a minimized transform that just strips path roots and puts slashes in the appropriate format (copied from the existing versions and trimmed a bit basically).
ZipEntry.Name is read-only after creation, so it ends up transforming the name twice when doing the local/central headers, rather than just doing it once.
I certify that I own, and have sufficient rights to contribute, all source code and related material intended to be compiled or integrated with the source code for the SharpZipLib open source product (the "Contribution"). My Contribution is licensed under the MIT License.