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

LibCompress: Implement DEFLATE properly.

Now we have an actual stream implementation that can read arbitrary
(dynamic codes aren't supported yet) deflate encoded data. Even if
the blocks are really large.

And all of that happens with a single buffer of 32KiB. DEFLATE is
amazing!
This commit is contained in:
asynts 2020-08-26 14:22:25 +02:00 committed by Andreas Kling
parent 71cbf72e8a
commit 7c53f14bbc
5 changed files with 417 additions and 504 deletions

View file

@ -55,9 +55,9 @@ Zlib::Zlib(ReadonlyBytes data)
m_data_bytes = data.slice(2, data.size() - 2 - 4);
}
Vector<u8> Zlib::decompress()
ByteBuffer Zlib::decompress()
{
return DeflateStream::decompress_all(m_data_bytes);
return DeflateDecompressor::decompress_all(m_data_bytes);
}
u32 Zlib::checksum()