This project provides a Python package that supports compression and decompression of the ZBIC algorithm that was first seen on the Nintendo Switch in version 22.0.0.
The zstd.c, zstd.h and zstd_errors.h files in this repository were copied from Atmosphere-NX.
The package can be installed with pip: pip3 install zbic.
def compress(data: bytes) -> bytes: ...
def decompress(data: bytes) -> bytes: ...import zbic
data = b"Hello World!"
compressed = zbic.compress(data)
decompressed = zbic.decompress(compressed)
assert data == decompressed