1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:27:43 +00:00

LibCompress: Rename Compress::Zlib to Compress::ZlibDecompressor

Because that's what it is, even if it mainly relies on
`DeflateDecompressor` to do the heavy lifting.
This commit is contained in:
Tim Schumacher 2022-12-26 15:51:51 +01:00 committed by Sam Atkins
parent edd004fe90
commit 23a9d62f39
6 changed files with 14 additions and 14 deletions

View file

@ -51,12 +51,12 @@ static ErrorOr<ByteBuffer> handle_content_encoding(ByteBuffer const& buf, Deprec
// Even though the content encoding is "deflate", it's actually deflate with the zlib wrapper.
// https://tools.ietf.org/html/rfc7230#section-4.2.2
auto uncompressed = Compress::Zlib::decompress_all(buf);
auto uncompressed = Compress::ZlibDecompressor::decompress_all(buf);
if (!uncompressed.has_value()) {
// From the RFC:
// "Note: Some non-conformant implementations send the "deflate"
// compressed data without the zlib wrapper."
dbgln_if(JOB_DEBUG, "Job::handle_content_encoding: Zlib::decompress_all() failed. Trying DeflateDecompressor::decompress_all()");
dbgln_if(JOB_DEBUG, "Job::handle_content_encoding: ZlibDecompressor::decompress_all() failed. Trying DeflateDecompressor::decompress_all()");
uncompressed = TRY(Compress::DeflateDecompressor::decompress_all(buf));
}