dcwatson / deflate

Python extension wrapper for libdeflate.
MIT License
25 stars 6 forks source link

fix: ensure proper CMake version present #55

Closed henryiii closed 4 months ago

henryiii commented 4 months ago

This should match your cmake_minimum_version.

(By the way, does threading make any sense? I could update this for free-threaded Python quite easily if it does).

dcwatson commented 4 months ago

I haven't looked into free-threading Python yet (apart from the talks I watched at PyCon!). I think this extension itself has very little use for threads, since libdeflate compressors/decompressors are not thread-safe themselves. If we ever implemented a higher-level chunked compression/decompression scheme (using multiple compressors/decompressors in separate threads), that would be another story, but I think that's out of scope for this library.

That said, threading in Python and calling deflate.gzip_compress on many chunks at once would be super useful. In fact, the whole reason I wrote this wrapper was to speed up a chunked encryption/compression library (https://github.com/imsweb/pzip). Being able to thread that will be a huge win - I did it in https://github.com/dcwatson/PZSwift and it performs great.