From bb834ed7650dae5ead49c7d5993799ad6982fa7f Mon Sep 17 00:00:00 2001 From: Lucas CHOLLET Date: Thu, 6 Jul 2023 14:18:50 -0400 Subject: [PATCH] LibCompress: Add a constructor to `Brotli::CanonicalCode` This constructor will be used by the JPEG-XL decoder to support a non-standard special case. Other user should only use other constructors. --- Userland/Libraries/LibCompress/Brotli.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Userland/Libraries/LibCompress/Brotli.h b/Userland/Libraries/LibCompress/Brotli.h index 2d75e7cfac..a9290bd42c 100644 --- a/Userland/Libraries/LibCompress/Brotli.h +++ b/Userland/Libraries/LibCompress/Brotli.h @@ -18,6 +18,9 @@ namespace Brotli { class CanonicalCode { public: CanonicalCode() = default; + CanonicalCode(Vector codes, Vector values) + : m_symbol_codes(move(codes)) + , m_symbol_values(move(values)) {}; static ErrorOr read_prefix_code(LittleEndianInputBitStream&, size_t alphabet_size); static ErrorOr read_simple_prefix_code(LittleEndianInputBitStream&, size_t alphabet_size);