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.
This commit is contained in:
Lucas CHOLLET 2023-07-06 14:18:50 -04:00 committed by Andrew Kaster
parent 96eace8390
commit bb834ed765
Notes: sideshowbarker 2024-07-17 03:19:14 +09:00

View file

@ -18,6 +18,9 @@ namespace Brotli {
class CanonicalCode {
public:
CanonicalCode() = default;
CanonicalCode(Vector<size_t> codes, Vector<size_t> values)
: m_symbol_codes(move(codes))
, m_symbol_values(move(values)) {};
static ErrorOr<CanonicalCode> read_prefix_code(LittleEndianInputBitStream&, size_t alphabet_size);
static ErrorOr<CanonicalCode> read_simple_prefix_code(LittleEndianInputBitStream&, size_t alphabet_size);