broadinstitute / viral-core

viral-ngs: read QC, barcode metrics, spike-in metrics, Illumina metrics and demux
Other
3 stars 0 forks source link

Replace custom custom mode selection in zstd_open() with zstandard.open() #105

Open tomkinsc opened 3 months ago

tomkinsc commented 3 months ago

The python-zstandard library previously lacked an open() method capable of opening zstd files in various modes (read/write binary/text). Such a function now exists, so util/file.py should replace the custom mode selection in zstd_open() with zstandard.open(). We should preserve the zstd_open() function for backward compatibility, and so a custom compressor can be passed in that has been configured to use multiple threads.