Skip to content
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

Closed
5 of 28 tasks
Tracked by #57209
carlossanlop opened this issue Dec 10, 2021 · 12 comments
Closed
5 of 28 tasks
Tracked by #57209

System.IO.Compression work planned for .NET 7 #62658

carlossanlop opened this issue Dec 10, 2021 · 12 comments
Assignees
Labels
area-System.IO.Compression Epic Groups multiple user stories. Can be grouped under a theme. Priority:2 Work that is important, but not critical for the release Team:Libraries
Milestone

Comments

@carlossanlop
Copy link
Member

carlossanlop commented Dec 10, 2021

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)

@carlossanlop carlossanlop added area-System.IO.Compression Bottom Up Work Not part of a theme, epic, or user story labels Dec 10, 2021
@carlossanlop carlossanlop added this to the Future milestone Dec 10, 2021
@ghost
Copy link

ghost commented Dec 10, 2021

Tagging subscribers to this area: @dotnet/area-system-io-compression
See info in area-owners.md if you want to be subscribed.

Issue Details

These are the higher priority Compression issues and requests affecting the community.

P0

P1

P2

Longer term (.NET 8+)

  • Explore if we should implement other algorithms or file formats, or recommend an existing 3rd party package and contribute to it.
  • Continuous performance improvements.
  • Improve documentation and add more examples.
Author: carlossanlop
Assignees: -
Labels:

area-System.IO.Compression, Bottom Up Work

Milestone: Future

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Dec 10, 2021
@carlossanlop carlossanlop added the Cost:XL Work that requires one engineer more than 4 weeks label Dec 10, 2021
@danmoseley
Copy link
Member

danmoseley commented Dec 10, 2021

Thanks @carlossanlop . Are there opportunities for community contributions here? Perhaps there's something that's suitable for someone interested to get started on

@carlossanlop
Copy link
Member Author

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.

@jeffhandley jeffhandley modified the milestones: Future, 7.0.0 Jan 9, 2022
@jeffhandley jeffhandley added Epic Groups multiple user stories. Can be grouped under a theme. Team:Libraries Priority:2 Work that is important, but not critical for the release User Story A single user-facing feature. Can be grouped under an epic. and removed untriaged New issue has not been triaged by the area owner Bottom Up Work Not part of a theme, epic, or user story Epic Groups multiple user stories. Can be grouped under a theme. User Story A single user-facing feature. Can be grouped under an epic. labels Jan 9, 2022
@jeffhandley jeffhandley changed the title Developers have access to better Compression APIs System.IO.Compression work planned for .NET 7 Jan 14, 2022
@jeffhandley jeffhandley removed the Cost:XL Work that requires one engineer more than 4 weeks label Feb 1, 2022
@AraHaan
Copy link
Member

AraHaan commented Feb 8, 2022

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).

@Genbox
Copy link

Genbox commented Feb 17, 2022

Finally, System.IO.Compression gets some much-needed attention!

Ask 1:
Can we revert this rather crazy input validation? It completely removes the ability to provide an alternative value, even though the related issue describes it as "a range check between 0 and 11" which out make much more sense.

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.

@Genbox
Copy link

Genbox commented Feb 17, 2022

Ask 2:
Can we change CompressionLevel to something a lot more user-friendly?

Current values are:

  • Optimal
  • Fastest
  • NoCompression
  • SmallestSize

I propose we change it to:

  • Store
  • Fast
  • Normal (or Default)
  • High
  • Maximum

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.

@Genbox
Copy link

Genbox commented Feb 17, 2022

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

@Genbox
Copy link

Genbox commented Feb 17, 2022

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:

  • It has the optimizations from intel and Cloudflare
  • It has a Zlib compatible API
  • It has the same Zlib license
  • It is 2x faster than Zlib out of the box

@AraHaan
Copy link
Member

AraHaan commented Feb 18, 2022

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:

  • zlib header
  • original data
  • zlib footer

but on other OSs:

  • zlib header
  • compressed data
  • zlib footer

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.

@jeffhandley
Copy link
Member

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.

@AraHaan
Copy link
Member

AraHaan commented Mar 20, 2022

@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.

@jeffhandley
Copy link
Member

@jeffhandley any updates for what I proposed here for zlib (all linked here): #62658 (comment) ?

@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.

@ghost ghost locked as resolved and limited conversation to collaborators Sep 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.IO.Compression Epic Groups multiple user stories. Can be grouped under a theme. Priority:2 Work that is important, but not critical for the release Team:Libraries
Projects
None yet
Development

No branches or pull requests

7 participants