Commit Graph

2 Commits

Author SHA1 Message Date
Taym Haddadi
42ea5360e0 Implement brotli support for CompressionStream and DecompressionStream (#40842)
Implement brotli support for CompressionStream and DecompressionStream

Testing: brotli test should pass
Fixes: #40831

---------

Signed-off-by: Taym Haddadi <haddadi.taym@gmail.com>
2025-11-25 02:04:14 +00:00
Kingsley Yung
e061e5c1b9 script: Implement Compression API (#39658)
The patch implements Compression (https://compression.spec.whatwg.org/)
with the compression and decompression provided by the `flate2` crate
(https://crates.io/crates/flate2).

`flate2` supports several different backends, controlled through the
crate's features. By default, it uses `miniz_oxide`
(https://crates.io/crates/miniz_oxide).

`flate2` provides three modules `read`, `write` and `bufread` which work
on instances of the `std::io::Read`, `std::io::Write` and
`std::io::Bufread` traits, respectively. The `write` module is chosen in
the patch since it matches the streaming model in the specification.

Testing: Enable WPT for Compression API, and introduce WPT expectation.

---------

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2025-10-27 08:21:35 +00:00