Open Mikebanana opened 2 years ago
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.
Always compressed level 5 is too rigid