Metadata-Version: 2.4
Name: sadcompressor
Version: 0.1.1
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: File Formats
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: System :: Archiving
Classifier: Topic :: System :: Archiving :: Compression
Requires-Dist: numpy
Requires-Dist: py-ubjson
Requires-Dist: packaging
Requires-Dist: rich
Requires-Dist: termcolor
Requires-Dist: pytest ; extra == 'tests'
Provides-Extra: tests
License-File: LICENSE.md
Summary: Streamed Array Data compressor
Keywords: compression,archive,stream
Author-email: Igor Lobanov <lobanov.igor@gmail.com>
License-Expression: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Repository, https://gitlab.com/alepoydes/sadcompressor.git

# sadcompressor

`sadcompressor` is a compact archival format and Python library for streamed time-series data (mainly NumPy arrays). It stores frames with delta updates, optional prediction, and quantization-based compression.

## Quick Start

```python
import numpy as np
import sadcompressor as sad

filename = "example.sad"

# Create archive
with sad.SADWriter(filename, prec_nbits=20, prec_maxexp=8) as writer:
    writer["x"] = np.array([1.0, 2.0, 3.0], dtype=np.float32)
    writer.next_key(0.1)
    writer["x"] = np.array([1.1, 2.1, 3.1], dtype=np.float32)

# Read archive sequentially
with sad.SADReader(filename) as reader:
    while not reader.next_key():
        print(f"t={reader.t:.3f}", reader["x"])
```

