make_fast_layout.h 663 B

1234567891011121314151617181920
  1. #pragma once
  2. #include "leaf_skipper.h"
  3. #include <cstddef>
  4. class IOutputStream;
  5. namespace NCompactTrie {
  6. // Return value: size of the resulting trie.
  7. size_t RawCompactTrieFastLayoutImpl(IOutputStream& os, const NCompactTrie::TOpaqueTrie& trie, bool verbose);
  8. // Return value: size of the resulting trie.
  9. template <class TPacker>
  10. size_t CompactTrieMakeFastLayoutImpl(IOutputStream& os, const char* data, size_t datalength, bool verbose, const TPacker* packer) {
  11. TPackerLeafSkipper<TPacker> skipper(packer);
  12. TOpaqueTrie trie(data, datalength, skipper);
  13. return RawCompactTrieFastLayoutImpl(os, trie, verbose);
  14. }
  15. }