Add CodecZlibExt to use faster deflate decompression - #173
Conversation
|
This seems like a bit unusual use case for an extension. Why not just change fully to CodecZlib if it is better? One issue in my opinion with using an extension is that the default will change if any transitive dependency happen to load CodecZlib so you can get kind of spooky action at a distance from this. |
|
@KristofferC, part of the idea of TiffImages.jl is that it has very few non-Julia dependencies. I would like to respect that choice while providing the option. After sleeping on this, I think introducing Preferences.jl to select the Zlib backend may make more sense rather than the mechanism I initially wrote here. |
This is correct. A full Julia (or as close as we can get) stack gives us a lot more maintainable and flexible code. I appreciate @mkitti's focus on this. Is this PR still alive or should I go ahead and close? |
|
We need to resolve Julia compat bounds, but yes this is very much alive. |
Currently, TiffImages.jl uses Inflate.jl to decompress TIFF files that use deflate decompression.
This pull request creates a package extension CodecZlibExt that will use CodecZlib for delfate
decompression if it is already loaded.
This PR uses a
Refthat can be modified viaTiffImages.set_zlib_decompression_stream!.That function is invoked the init function of the extension.
The main reason for wanting to use CodecZlib.jl is that it is much faster than Inflate.jl
for decompression.