1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:27:46 +00:00

LibCompress: Let BrotliDecompressionStream take a MaybeOwned

This commit is contained in:
Tim Schumacher 2023-06-08 19:48:05 +02:00 committed by Sam Atkins
parent 8a853278d0
commit dbc25f18ec
6 changed files with 8 additions and 8 deletions

View file

@ -24,7 +24,7 @@ static void run_test(StringView const file_name)
DeprecatedString path_compressed = DeprecatedString::formatted("{}.br", path);
auto file = MUST(Core::File::open(path_compressed, Core::File::OpenMode::Read));
auto brotli_stream = Compress::BrotliDecompressionStream { *file };
auto brotli_stream = Compress::BrotliDecompressionStream { MaybeOwned<Stream> { *file } };
auto data = MUST(brotli_stream.read_until_eof());
EXPECT_EQ(data, cmp_data);
@ -97,7 +97,7 @@ TEST_CASE(brotli_decompress_zero_one_bin)
DeprecatedString path_compressed = DeprecatedString::formatted("{}.br", path);
auto file = MUST(Core::File::open(path_compressed, Core::File::OpenMode::Read));
auto brotli_stream = Compress::BrotliDecompressionStream { *file };
auto brotli_stream = Compress::BrotliDecompressionStream { MaybeOwned<Stream> { *file } };
u8 buffer_raw[4096];
Bytes buffer { buffer_raw, 4096 };