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

Implement matching compression for old gzip versions #22

Merged
merged 5 commits into from
Jun 4, 2024

Conversation

cadmic
Copy link
Contributor

@cadmic cadmic commented Jun 4, 2024

This is based on https://github.com/Thar0/gzip-1.3.3-ique though I tried to reimplement things as much as possible instead of blindly porting the code. The gzip algorithm has a lot of quirks though which basically force some things to be done a particular way in order to match. It supports compression levels 4-9 (0-3 use a slightly different algorithm which I didn't implement) and simulating building with -DSMALL_MEM.

I checked that this matches both OOT iQue versions and all 3 Dr. Mario versions. Test script (run cargo build --release first): https://gist.github.com/cadmic/3b058f3809932df4dc6bc6ff9cf2ff8d. I also added in-repo tests for the 3 settings we care about (--level 9, --level 9 --small-mem, and --level 6 --small-mem).

python_bindings/tests.py Outdated Show resolved Hide resolved
@AngheloAlf
Copy link
Contributor

Could you add the references you used to the readme?

@AngheloAlf AngheloAlf merged commit 0ca355d into decompals:main Jun 4, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants