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

LibCompress: Use newly created Zlib header structure when decompressing

This way we can get rid of some magic numbers.
This commit is contained in:
Karol Kosek 2022-06-17 09:26:04 +02:00 committed by Linus Groh
parent 20575ea1f3
commit 42abe1df77
2 changed files with 16 additions and 25 deletions

View file

@ -48,13 +48,9 @@ public:
static Optional<ByteBuffer> decompress_all(ReadonlyBytes);
private:
Zlib(ReadonlyBytes data);
Zlib(ZlibHeader, ReadonlyBytes data);
u8 m_compression_method;
u8 m_compression_info;
u8 m_check_bits;
u8 m_has_dictionary;
u8 m_compression_level;
ZlibHeader m_header;
u32 m_checksum { 0 };
ReadonlyBytes m_input_data;