msglc
msglc is a Python library that provides a way to serialize and deserialize json objects with lazy/partial loading
containers using
msgpack
or
cbor as the serialization format.
It can be used in environments that use msgpack to store/exchange data that is larger than a few MBs if any of the
followings hold.
- After cold storage, each retrieval only accesses part of the stored data.
- Cannot afford to decode the whole file due to memory limitation, performance consideration, etc.
- Want to combine encoded data into a single blob without decoding and re-encoding the same piece of data.
Installation
msglc is a pure Python library and can be installed using pip.
msgspec
msgspec is an alternative library that provides better decoding performance
compared to msgpack.
It is recommended to use msgspec.
numpy
numpy arrays can be serialized and deserialized, to use this feature, install numpy.
s3fs
To use msglc with S3 storage, install s3fs.