1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:17:35 +00:00

AK: Remove the fallible constructor from FixedMemoryStream

This commit is contained in:
Tim Schumacher 2023-01-30 11:05:43 +01:00 committed by Linus Groh
parent 8b2f23d016
commit 220fbcaa7e
31 changed files with 185 additions and 209 deletions

View file

@ -70,8 +70,8 @@ static ErrorOr<ByteBuffer> handle_content_encoding(ByteBuffer const& buf, Deprec
} else if (content_encoding == "br") {
dbgln_if(JOB_DEBUG, "Job::handle_content_encoding: buf is brotli compressed!");
auto bufstream = TRY(FixedMemoryStream::construct({ buf.data(), buf.size() }));
auto brotli_stream = Compress::BrotliDecompressionStream { *bufstream };
FixedMemoryStream bufstream { buf };
auto brotli_stream = Compress::BrotliDecompressionStream { bufstream };
auto uncompressed = TRY(brotli_stream.read_until_eof());
if constexpr (JOB_DEBUG) {