
Pcodec Python API
Pcodec is a codec for numerical sequences. Example usage:
>>> from pcodec import standalone, ChunkConfig
>>> import numpy as np
>>>
>>> np.random.seed(0)
>>> nums = np.random.normal(size=1000000)
>>>
>>>
>>> compressed = standalone.simple_compress(nums, ChunkConfig())
>>> print(f'compressed to {len(compressed)} bytes')
compressed to 6946278 bytes
>>>
>>>
>>> recovered = standalone.simple_decompress(compressed)
>>>
>>> np.testing.assert_array_equal(recovered, nums)
For pcodec's uses, design, and benchmarks, see the main repo.
Documentation is served
on readthedocs.
It's sometimes incomplete, but the types and functions largely mirror those of
the better-documented Rust API.