Metadata-Version: 2.5
Name: chunkerlib
Version: 0.1.0
Summary: Split binary data into fixed-size chunks. Zero dependencies, fully typed
Project-URL: Homepage, https://github.com/NytroxDev/ChunkerLib
Project-URL: Repository, https://github.com/NytroxDev/ChunkerLib
Project-URL: Issues, https://github.com/NytroxDev/ChunkerLib/issues
Author-email: Nytrox <nytrox.dev@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: binary,chunk,chunking,data,files,splitting
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.9
Provides-Extra: dev
Requires-Dist: mypy>=2.2.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.15.21; extra == 'dev'
Provides-Extra: test
Requires-Dist: pytest-cov>=4.0; extra == 'test'
Requires-Dist: pytest>=8.0; extra == 'test'
Description-Content-Type: text/markdown

# ChunkerLib

[![PyPI version](https://img.shields.io/pypi/v/chunkerlib.svg)](https://pypi.org/project/chunkerlib/)
[![Python versions](https://img.shields.io/pypi/pyversions/chunkerlib.svg)](https://pypi.org/project/chunkerlib/)
[![License](https://img.shields.io/github/license/NytroxDev/ChunkerLib.svg)](https://github.com/NytroxDev/ChunkerLib)
[![CI](https://img.shields.io/github/actions/workflow/status/NytroxDev/ChunkerLib/ci.yml)](https://github.com/NytroxDev/ChunkerLib/actions)

Split binary data into fixed-size chunks. Zero dependencies, fully typed, works with any file size thanks to memory views.

## Installation

```bash
pip install chunkerlib
```

## Quick start

```python
from chunkerlib import DataChunker

data = b"some binary file content"

chunker = DataChunker(data, chunk_size=4)

for chunk_id, chunk in chunker.split():
    print(chunk_id, bytes(chunk))

print(f"{chunker.number_of_chunks} chunks")
```

## Features

- Zero runtime dependencies
- Splits `bytes` and `memoryview` without copying the data
- Random access to chunks (`get_chunk`, `get_chunk_range`)
- Static typed, compatible with Python 3.9+

## Examples

- `examples/basic_usage.py`: split data and reassemble it
- `examples/random_access.py`: fetch a single chunk or a range
- `examples/file_chunking.py`: split a file on disk into parts

## Documentation

See [DOCUMENTATION.md](DOCUMENTATION.md) for the full API reference.

## License

[MIT](LICENSE)
