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

Can you make custom compression levels #29

Open
Mikebanana opened this issue Apr 13, 2022 · 1 comment
Open

Can you make custom compression levels #29

Mikebanana opened this issue Apr 13, 2022 · 1 comment

Comments

@Mikebanana
Copy link

Always compressed level 5 is too rigid

@mw99
Copy link
Owner

mw99 commented Apr 13, 2022

Hi! Unfortunately Apples Compression Framework does not allow special compression flags to be passed to the underlaying algorithm. I thought, Apple would add it one day, and then I would of course too, but that never happened.

Your only option is to use zlib directly if you want to change the compression level. If you are willing to go down that road, may I recommend taking a look at my code here, it shows how to load a function pointer from the zlib dynamically at runtime.

Also I'm pretty sure there is a clean Swift wrapper around libz out there as well.

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

No branches or pull requests

2 participants