I'm adding zstd support to Wyng backup using your module. I would prefer not to specify the number of threads when calling compress() so that compression can scale with the number of cores (and so I can also avoid using a lambda for compress), however that leaves open the question of whether python-zstd will then sometimes use the zstandard single-threaded mode on single-core CPUs.
My technical requirement is to compress data chunks in a reproducible way to enable deduplication during the backup process. This means always using the zstandard multi-threaded mode, even on single-core CPUs. Automatic switching between the single-threaded and multi-threaded code is what I need to avoid.
I read through the Readme and issue #48 looking for indications about the modules behavior under these conditions, but didn't find any. What I'm looking for is guidance on exactly when python-zstd uses single-threaded mode, if at all, so I can avoid it.
I'm adding zstd support to Wyng backup using your module. I would prefer not to specify the number of threads when calling
compress()
so that compression can scale with the number of cores (and so I can also avoid using a lambda forcompress
), however that leaves open the question of whether python-zstd will then sometimes use the zstandard single-threaded mode on single-core CPUs.My technical requirement is to compress data chunks in a reproducible way to enable deduplication during the backup process. This means always using the zstandard multi-threaded mode, even on single-core CPUs. Automatic switching between the single-threaded and multi-threaded code is what I need to avoid.
I read through the Readme and issue #48 looking for indications about the modules behavior under these conditions, but didn't find any. What I'm looking for is guidance on exactly when python-zstd uses single-threaded mode, if at all, so I can avoid it.