PRO-PACK for Python
Based on RNC ProPack Source.
I wanted something I could install from pypi and I could import in Python projects. So here it is.
Test data can be found in this repo
Install
pip install propack
Usage
Python API
from propack import pack, unpack, parse_header
# Compress
raw = open('data.bin', 'rb').read()
packed = pack(raw, method=1) # method 1 (Huffman+LZ77) or 2
# Decompress
original = unpack(packed)
assert original == raw
# Inspect header
header = parse_header(packed)
print(f'method={header.method} {header.packed_size} -> {header.unpacked_size} bytes')
CLI
# Compress
propack pack data.bin # -> data.rnc1
propack pack data.bin -m 2 # -> data.rnc2
propack pack data.bin -m 1 output.rnc # explicit output
# Decompress
propack unpack data.rnc1 # -> data
propack unpack data.rnc1 output.bin # explicit output
# Inspect
propack info data.rnc1 # show header fields
# Scan a file for embedded RNC data
propack scan rom.bin
# Extract all embedded RNC blocks
propack extract rom.bin -o output_dir/
Compatibility
Version 0.3.1 fixes encryption key continuity across chunks to match RNC ProPack. Encrypted files spanning multiple chunks written by earlier versions may use nonstandard per-chunk key resets. Decode those files with the version that created them, then recompress them with 0.3.1 or later.
🔗 Links
Metadata
Release files for propack 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| propack-0.3.1.tar.gz | 12.4 kB | Without provenance | Details for propack-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| propack-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for propack-0.3.1-py3-none-any.whl |
Total release size: 27.3 kB
Release files / propack-0.3.1.tar.gz
| Download URL | propack-0.3.1.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0560c8021a4c14a9b10ca633b421315e79980483b31316173f74ba483acc85b2
|
|
BLAKE2b-256 checksum How to use checksums |
1480e274a843c8c49b60634841edccf6a4542ef9f1053d2392adfcbe4a950a36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.22
|
Release files / propack-0.3.1-py3-none-any.whl
| Download URL | propack-0.3.1-py3-none-any.whl |
|---|---|
| Size | 14.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e280150cb2d3b43ccd1ca04c0e0116a1a1adf9e4bc88e19420d1cda02b418062
|
|
BLAKE2b-256 checksum How to use checksums |
c88bf3f709b51b35d643950b4b2c2ab9cb8a424d3f41fb395acbc22da254a69e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.22
|
Security for propack 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.