crunchmania
crunchmania.header
crunchmania.bitreader
BackwardBitReader Objects
class BackwardBitReader()
LSB-first bit reader that reads bytes backward through packed data.
__init__
def __init__(data: bytes | bytearray, start: int, end: int)
Arguments:
data- full file datastart- first byte of packed data (after header)end- offset to last 6 bytes of packed data (header_size + packed_size - 6)
crunchmania.constants
crunchmania.unpack
unpack
def unpack(data: bytes | bytearray) -> bytes
Decompress Crunch-Mania compressed data.
Arguments:
data- raw file data starting with CrM header
Returns:
decompressed data as bytes
Raises:
ValueError- on invalid header or corrupt data