Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /compression/decompression-brotli-large-window.tentative.any.html - WPT Dashboard Interop Dashboard
- /compression/decompression-brotli-large-window.tentative.any.serviceworker.html - WPT Dashboard Interop Dashboard
- /compression/decompression-brotli-large-window.tentative.any.sharedworker.html - WPT Dashboard Interop Dashboard
- /compression/decompression-brotli-large-window.tentative.any.worker.html - WPT Dashboard Interop Dashboard
// META: global=window,worker
// Brotli encoding of "Hello World" generated with large_window = true
// and lgwin = 25.
const LARGE_WINDOW_CHUNK = new Uint8Array([17, 25, 20, 0, 2, 72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 3]);
promise_test(async (t) => {
const stream = new Blob([LARGE_WINDOW_CHUNK]).stream().pipeThrough(new DecompressionStream("brotli"));
const text = await new Response(stream).text();
assert_equals(text, "Hello World");
}, "DecompressionStream should support brotli large window");