OpenFreeEnergy / gufe

grand unified free energy by OpenFE
https://gufe.readthedocs.io
MIT License
28 stars 7 forks source link

Add compression approach to Numpy arrays when passed through JSON encoder #321

Open dotsdl opened 1 month ago

dotsdl commented 1 month ago

It may be possible to reduce the size of ProtocolDAGResults and other GufeTokenizables that require the use of numpy arrays for storing numerical data if we apply compression against the byte form of the array, followed by base64 encoding the compressed form for inclusion in the JSON-serialized form. It's unclear a priori by how much this will reduce sizes, but may be better than including the data in uncompressed byte form as we do currently.

For high decompression speed, use of python-zstandard might be the best approach.