aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/containers/comptrie/make_fast_layout.h
blob: cb488ffaa5b6c9ce289a007e6cf11587b4a9e982 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#include "leaf_skipper.h"
#include <cstddef>

class IOutputStream;

namespace NCompactTrie {
    // Return value: size of the resulting trie. 
    size_t RawCompactTrieFastLayoutImpl(IOutputStream& os, const NCompactTrie::TOpaqueTrie& trie, bool verbose); 

    // Return value: size of the resulting trie. 
    template <class TPacker> 
    size_t CompactTrieMakeFastLayoutImpl(IOutputStream& os, const char* data, size_t datalength, bool verbose, const TPacker* packer) { 
        TPackerLeafSkipper<TPacker> skipper(packer); 
        TOpaqueTrie trie(data, datalength, skipper); 
        return RawCompactTrieFastLayoutImpl(os, trie, verbose); 
    } 
 
}