[PR #38] add Python port of bro utility and scripts to test Brotli extension #622

Open
opened 2026-01-29 20:46:27 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/google/brotli/pull/38

State: closed
Merged: Yes


The bro.py accepts the same options as the bro command-line utility, and supports piping to/from the standard streams.
The test scripts are simple Python ports of compatibility_test.sh and roundtrip_test.sh shell script.

I made that to be able to test the Brotli Python extension against the same data used by the test shell scripts.
The scripts are especially useful on Windows, which doesn't include the bash shell, and where the bro utility fails to compile using the native MSVC compiler.

Please note that bro.py depends on @khaledhosny's #36 patch, since it just calls brotli.decompress(string) and expects the decompression buffer to be dynamically allocated.

Thank you.

Cosimo

**Original Pull Request:** https://github.com/google/brotli/pull/38 **State:** closed **Merged:** Yes --- The `bro.py` accepts the same options as the `bro` command-line utility, and supports piping to/from the standard streams. The test scripts are simple Python ports of `compatibility_test.sh` and `roundtrip_test.sh` shell script. I made that to be able to test the Brotli Python extension against the same data used by the test shell scripts. The scripts are especially useful on Windows, which doesn't include the bash shell, and where the `bro` utility fails to compile using the native MSVC compiler. Please note that `bro.py` depends on @khaledhosny's #36 patch, since it just calls `brotli.decompress(string)` and expects the decompression buffer to be dynamically allocated. Thank you. Cosimo
claunia added the pull-request label 2026-01-29 20:46:27 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#622