Metadata-Version: 2.4
Name: pydexomizer
Version: 0.1.0
Summary: Pure-Python decompressor for Commodore exomizer data (raw, mem, level, sfx).
Project-URL: Homepage, https://github.com/anarkiwi/pydexomizer
Project-URL: Repository, https://github.com/anarkiwi/pydexomizer
Project-URL: Issues, https://github.com/anarkiwi/pydexomizer/issues
Author-email: Josh Bailey <josh@overlyspecific.com>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: 6502,c64,commodore,decompression,exomizer,prg
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: System :: Archiving :: Compression
Requires-Python: >=3.11
Requires-Dist: numpy>=1.24
Requires-Dist: py65>=1.1
Provides-Extra: speedup
Requires-Dist: numba>=0.59; extra == 'speedup'
Provides-Extra: test
Requires-Dist: numba>=0.59; extra == 'test'
Requires-Dist: pytest-cov>=4; extra == 'test'
Requires-Dist: pytest-xdist>=3; extra == 'test'
Requires-Dist: pytest>=7; extra == 'test'
Description-Content-Type: text/markdown

# pydexomizer

Pure-Python decompressor ("decrunch") for Commodore exomizer data. Decompression only, no cruncher.

## Install

```
pip install pydexomizer
pip install pydexomizer[speedup]   # optional numba accelerator
```

## Formats

- `raw` - raw exomizer streams (all -P proto variants)
- `mem` - `exomizer mem` PRGs
- `level` - `exomizer level` segments
- `sfx` - self-extracting PRGs, via 6502 emulation

## Usage

```python
from pydexomizer import (
    decrunch_raw, decrunch_mem, decrunch_level, decrunch_sfx,
)

data = decrunch_raw(raw_bytes)                 # -> bytes

res = decrunch_mem(mem_prg_bytes)              # -> DecrunchResult(start, data, entry)
res = decrunch_level(level_bytes)              # -> DecrunchResult(start, data, entry)
res = decrunch_sfx(sfx_prg_bytes)              # -> SfxResult(start, data, entry, cycles)
res.start, res.data
```

## CLI

```
pydexomizer input.prg -f sfx -o output.prg
```

## Development

See [docs/](docs/).

## Acknowledgements

Algorithm derived from Magnus Lind's [exomizer](https://bitbucket.org/magli143/exomizer) (zlib licence), used as the reference implementation.

## Licence

Apache-2.0
