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.bin
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/
🔗 Links
Release files for propack 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| propack-0.2.0.tar.gz | 11.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| propack-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.4 kB
Release files / propack-0.2.0.tar.gz
| Download URL | propack-0.2.0.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e500c1a908b1ffa8cba89b1ba2bb8710e948499603e37c7e1a21753acea92fc5
|
|
BLAKE2b-256 checksum How to use checksums |
b83d15fee798b0c418abedd21160b401fa62a7fecc098dbf8d7e95417d57056a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.21
|
Release files / propack-0.2.0-py3-none-any.whl
| Download URL | propack-0.2.0-py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f7fde8528a9ecaf88ae8c1b55643d5ab25a7184c348f3dbe02dbeae54519f368
|
|
BLAKE2b-256 checksum How to use checksums |
160c599a41111d72c318e1bd2faafabd10fbffa2fe9006a305727e00a4c57f71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.21
|