#pragma once #include "RawTree.h" #include #include class HuffmanEncoder { using DataStream = std::vector; using CountPair = std::pair; public: void encode(const DataStream& stream); void encode(const std::unordered_map& counts); private: void dumpTree(const RawTree& tree) const; void dumpNode(RawNode* node, unsigned depth) const; };