mphowardlab / lammpsio

Python tools for working with LAMMPS files
BSD 3-Clause "New" or "Revised" License
7 stars 1 forks source link

Add optional support for zstd-compressed dumps #44

Closed PhilLecl closed 5 months ago

PhilLecl commented 6 months ago

This adds support for zstd-compressed dumps.
As Python has no inbuilt support for zstd, I've used the pyzstd module, which is essentially identical in usage to the gzip module.
In order to not introduce any required dependencies, this also handles cases where the pyzstd module is not installed.

Note that I've only tested this for reading zstd-compressed dumps. You may want to add test cases, especially for writing.

mphoward commented 6 months ago

Thank you! This will be a great extra feature to have. I will assign someone to edit the PR and add some tests like you've suggested.

mphoward commented 5 months ago

pre-commit.ci autofix