More generic handling of reserving a value for transparency

Now, will also support other compressions than DEFLATE