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

LibCompress: Implement Brotli decompressor

This implements the BrotliDecompressionStream, which is a Core::Stream
that can decompress another Core::Stream.
This commit is contained in:
Michiel Visser 2022-03-31 21:07:45 +02:00 committed by Andreas Kling
parent 68772463cb
commit d6a5b11f04
28 changed files with 2725 additions and 0 deletions

View file

@ -0,0 +1,32 @@
/*
* Copyright (c) 2022, Michiel Visser <opensource@webmichiel.nl>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/ByteBuffer.h>
namespace Compress {
class BrotliDictionary {
public:
enum TransformationOperation {
Identity,
FermentFirst,
FermentAll,
OmitFirst,
OmitLast,
};
struct Transformation {
StringView prefix;
TransformationOperation operation;
u8 operation_data;
StringView suffix;
};
static ErrorOr<ByteBuffer> lookup_word(size_t index, size_t length);
};
}