google/brotli — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me an open source Brotli compression project.

I want a reusable lossless compression library and a simple command line tool that can compress and decompress files or data streams. It should follow the official Brotli compressed data format, so please look up RFC 7932 if you need to. The goal is dense compression with speed similar to deflate, using the normal Brotli ideas like LZ style matching, Huffman coding, and context modeling.

Please make it practical for people to build from source on Linux and Mac, with clear CMake and Bazel instructions, plus a Python package install path. Include examples for using it from the terminal and from Python. Add tests that prove compressed data can be decoded back exactly, including streaming cases and invalid input handling.

Also document the important limitation that the raw Brotli stream does not store checksums or the original uncompressed length, so users should add that separately if they need integrity checks.

Want more depth? Deep Reverse