Skip to content

Add Support for Brotli Compression #1126

Open
@qkaiser

Description

@qkaiser

Description
Brotli is a general-purpose, lossless compression algorithm developed by Google, widely used for web content compression (e.g., serving compressed static files).

References

How to Craft

  1. Install Brotli CLI (e.g., sudo apt-get install brotli or via npm install brotli).
  2. Run:
    brotli --quality=9 --input file_to_compress --output file_to_compress.br

Magic Value / Signature

  • No fixed magic number. Brotli’s initial bytes encode parameters (like window size), but it’s not a static signature.
  • Detection often relies on partial stream parsing or heuristics.

How to Extract / Decompress

  • Tool: Use the brotli CLI to decompress:
    brotli --decompress file_to_compress.br
  • Python Library: The brotli library supports decompression in Python.

Determining End Offset

  • Brotli streams are self-terminating.
  • unblob can either:
    • Decode the stream until it ends.
    • Use the container file size if available.
  • Proper detection requires partial decoding or known container boundaries to confirm the stream ends where expected.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions