dissect.util.compression.lz4

Module Contents

Functions

decompress

LZ4 decompress from a file-like object or bytes up to a certain length. Assumes no header.

dissect.util.compression.lz4.decompress(src: bytes | BinaryIO, uncompressed_size: int = -1, return_bytearray: bool = False) bytes | tuple[bytes, int]

LZ4 decompress from a file-like object or bytes up to a certain length. Assumes no header.

Parameters:
  • src – File-like object or bytes to decompress from.

  • uncompressed_size – Ignored, present for compatibility with native lz4.

  • return_bytearray – Whether to return bytearray or bytes.

Returns:

The decompressed data.