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

ZLib compression overhaul #5

Merged
merged 4 commits into from
Feb 2, 2022

Conversation

PaulusParssinen
Copy link
Collaborator

This pull request removes all use of 3rd-party compression libraries and instead uses new System.IO.Compression APIs (ZLibStream). ZLibStream re-compression does not produce a bit perfect assembly of a file but this does not(?) break either AIR or other disassembler and I consider that to be fine.

There was no replacement for LZMA but there is work and a lot of interest in adding such for .NET 7. As of writing this PR it's been given Priority 1 and is being tracked at dotnet/runtime#1542. The existing LZMA code was removed for now and will be added back with a big code overhaul by me or be whatever Microsoft will decide for the .NET 7 issue.

It also includes rewrite of DefineBitsLossLess tag handling and subsequently adds support for both versions of the tag. The job of decompressing the image data is given to the consumer of the tag in order to give support for different BitmapFormats and make it easier to write the tag back to file.

@PaulusParssinen PaulusParssinen merged commit 3115ac3 into ArachisH:master Feb 2, 2022
@PaulusParssinen PaulusParssinen deleted the zlib-rework branch February 2, 2022 18:58
@ArachisH ArachisH added this to the 1.0.0 milestone Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants