mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-28 21:26:22 +00:00
LibCompress: Brotli support metadata of skip_length=0
The relevant RFC section from https://www.rfc-editor.org/rfc/rfc7932#section-9.2 MSKIPBYTES * 8 bits: MSKIPLEN - 1, where MSKIPLEN is the number of metadata bytes; this field is only present if MSKIPBYTES is positive; otherwise, MSKIPLEN is 0 (if MSKIPBYTES is greater than 1, and the last byte is all zeros, then the stream should be rejected as invalid) So when skip_bytes is zero we need to break and re-align bytes. Added the relevant test case that demonstrates this from: https://github.com/google/brotli/blob/master/tests/testdata/x.compressed
This commit is contained in:
parent
7ea987456a
commit
0ee98c69c1
Notes:
sideshowbarker
2024-07-17 06:01:56 +09:00
Author: https://github.com/tam7t 🔰
Commit: 0ee98c69c1
Pull-request: https://github.com/SerenityOS/serenity/pull/15291
4 changed files with 53 additions and 1 deletions
|
@ -80,6 +80,11 @@ TEST_CASE(brotli_single_z)
|
|||
run_test("single-z.txt"sv);
|
||||
}
|
||||
|
||||
TEST_CASE(brotli_single_x)
|
||||
{
|
||||
run_test("single-x.txt"sv);
|
||||
}
|
||||
|
||||
TEST_CASE(brotli_decompress_zero_one_bin)
|
||||
{
|
||||
// This makes sure that the tests will run both on target and in Lagom.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue