-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.IO.Compression work planned for .NET 7 #62658
Comments
Tagging subscribers to this area: @dotnet/area-system-io-compression Issue DetailsThese are the higher priority Compression issues and requests affecting the community. P0
P1
P2
Longer term (.NET 8+)
|
Thanks @carlossanlop . Are there opportunities for community contributions here? Perhaps there's something that's suitable for someone interested to get started on |
Yes, I think I can mark a couple of issues as up-for-grabs, but I first need to add a comment with some context first. |
More things I would like done for .NET 7 (Zlib):
For this it might be until P3~P5 or 6 at the latest (to give time for review, approval, PR, tests, and merge). |
Finally, System.IO.Compression gets some much-needed attention! Ask 1: Edit: It seems all other encoder/decoders have the same behavior. I respect that all are now doing the same thing, but I much rather have a range validation check than a strict map from enum to hardcoded level. Every sine encoder/decoder that currently exists and all future ones should have sane input validation on the compression level to ensure there is no unexpected behavior. |
Ask 2:
I propose we change it to:
If that is not possible for whatever reason, can we at least change "Optimal" to "Default"? The main reason is that .NET devs and users alike seem to not understand what "optimal" means. I've had this discussion in 2018 and about 15 times since. |
Ask 3: Please expose more advanced configurations. Encoders/Decoders have a million options like providing a set of pre-defined wordlists, Huffman encoding specific options, window sizes, and much more. There is no way to squeeze all that into constructors as single values. Properties are not a solution as some of these values needs to be available before the encoder/decoder is used, so they need to come in the constructor. There is an excellent proposal here, which would solve that problem altogether: #42820 |
Ask 4: Zlib is great, but the implementation is dated. There are several highly optimized versions out there:
Zlib-ng seems like a good next step:
|
I been working on a span based zlib that calls into the same native version under the hood that provides more config. However it will need to be marked as ready for review so it can have a PR be created. As for the PR I would have to place 2 related proposals into the same PR as well they depend on eachother on changes (new types would be added to expose all compression levels for all of the currently implemented compressors in the runtime for better configuration). I would have made the options classes structs in that proposal but sadly C# does not allow structs to inherit from other structs. As for other zlib native libraries, while they may be beneficial for performance, what prevents them from accidentally breaking something in the library they are working on. I noticed something similar when I was trying to implement the same faster stuff in my fully C# zlib library but it only broke on MacOS where all the compressed data was simply:
but on other OSs:
As such, something as trivial as an native dependency change could break someone even if it provides a performance boost unless tested extensively in anyone's possible situation that can happen. |
This list in this issue has been edited to reflect changes from our ongoing planning and discussions. The headings have been updated to reflect what is still planned for .NET 7 and what is in the backlog. The list is still expected to change throughout the release cycle with periodic reviews of our plans. |
@jeffhandley any updates for what I proposed here for zlib (all linked here): #62658 (comment) ? I really need them in .NET 7 at least if possible because span based compression apis should be a priority as well (I think) for those of us who hate stream based due to perf from loading a files as bytes, then create a stream, use that stream with compression apis to compress/decompress, do other stuff that expects spans, and then save the compressed/decompressed output. The stream part becomes a pain as with span based compression apis they can be avoided entirely. |
@AraHaan I'm sorry I overlooked that question months back and didn't notice until now. The proposals you made for zlib are valuable, but did not make it into .NET 7.0. We will consider them while we do our .NET 8 planning. Thank you. |
This issue captures the planned work for .NET 7. This list is expected to change throughout the release cycle according to ongoing planning and discussions, with possible additions and subtractions to the scope.
Planned for .NET 7
Backlog (roughly in priority order)
DeflateStream
,GZipStream
,ZLibStream
.The text was updated successfully, but these errors were encountered: