mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
1682f0b760
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
37 lines
685 B
C++
37 lines
685 B
C++
/*
|
|
* Copyright (c) 2020, the SerenityOS developers
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/ByteBuffer.h>
|
|
#include <AK/Span.h>
|
|
#include <AK/Types.h>
|
|
|
|
namespace Compress {
|
|
|
|
class Zlib {
|
|
public:
|
|
Optional<ByteBuffer> decompress();
|
|
u32 checksum();
|
|
|
|
static Optional<Zlib> try_create(ReadonlyBytes data);
|
|
static Optional<ByteBuffer> decompress_all(ReadonlyBytes);
|
|
|
|
private:
|
|
Zlib(const ReadonlyBytes& data);
|
|
|
|
u8 m_compression_method;
|
|
u8 m_compression_info;
|
|
u8 m_check_bits;
|
|
u8 m_has_dictionary;
|
|
u8 m_compression_level;
|
|
|
|
u32 m_checksum { 0 };
|
|
ReadonlyBytes m_input_data;
|
|
ReadonlyBytes m_data_bytes;
|
|
};
|
|
|
|
}
|