Toward core module compiling.

This commit is contained in:
jmsgrogan 2023-12-27 12:20:02 +00:00
parent c25a56ee19
commit 3ed195d7dd
305 changed files with 1774 additions and 1065 deletions

View file

@ -17,24 +17,24 @@ public:
String dumpPrefixCodes() const;
std::optional<HuffmanTree::Symbol> findMatch(std::size_t treeIndex, uint32_t code) const;
std::optional<HuffmanTree::Symbol> findMatch(size_t treeIndex, uint32_t code) const;
const HuffmanTree& getTree() const;
const PrefixCode& getCode(std::size_t index) const;
const PrefixCode& getCode(size_t index) const;
std::optional<PrefixCode> getCodeForSymbol(unsigned symbol) const;
using CompressedSequenceEntry = std::pair<unsigned, unsigned>;
const Vector<CompressedSequenceEntry>& getCompressedLengthSequence() const;
const Vector<std::size_t> getCompressedLengthCounts() const;
const Vector<size_t> getCompressedLengthCounts() const;
std::size_t getNumCodeLengths() const;
size_t getNumCodeLengths() const;
unsigned getCodeLength(std::size_t treeIndex) const;
unsigned getCodeLength(size_t treeIndex) const;
std::size_t mapToDeflateIndex(std::size_t index) const;
size_t mapToDeflateIndex(size_t index) const;
void setInputLengthSequence(const Vector<unsigned char>& sequence, bool targetDeflate = true);
@ -49,7 +49,7 @@ private:
Vector<PrefixCode> mCodes;
Vector<CompressedSequenceEntry> mCompressedLengthSequence;
Vector<std::size_t> mCompressedLengthCounts;
Vector<size_t> mCompressedLengthCounts;
static constexpr unsigned DEFLATE_PERMUTATION_SIZE{19};
static constexpr unsigned DEFLATE_PERMUTATION[DEFLATE_PERMUTATION_SIZE]{16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};