mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:47:46 +00:00
LibCompress: Port DeflateDecompressor
to Core::Stream
This commit is contained in:
parent
f909cfbe75
commit
30abd47099
8 changed files with 129 additions and 196 deletions
|
@ -44,7 +44,10 @@ Zlib::Zlib(ZlibHeader header, ReadonlyBytes data)
|
|||
|
||||
Optional<ByteBuffer> Zlib::decompress()
|
||||
{
|
||||
return DeflateDecompressor::decompress_all(m_data_bytes);
|
||||
auto buffer_or_error = DeflateDecompressor::decompress_all(m_data_bytes);
|
||||
if (buffer_or_error.is_error())
|
||||
return {};
|
||||
return buffer_or_error.release_value();
|
||||
}
|
||||
|
||||
Optional<ByteBuffer> Zlib::decompress_all(ReadonlyBytes bytes)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue