diff options
author | alzobnin <alzobnin@yandex-team.ru> | 2022-02-10 16:46:50 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:50 +0300 |
commit | c9317148cc3e9f1b0bc0ce95172f47e099f2c554 (patch) | |
tree | 1e426d905ba97d8c281c5cc53389faaced3832c7 /library/cpp/containers/comptrie/comptrie_builder.inl | |
parent | 6170310e8721e225f64ddabf7a7358253d7a1249 (diff) | |
download | ydb-c9317148cc3e9f1b0bc0ce95172f47e099f2c554.tar.gz |
Restoring authorship annotation for <alzobnin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/containers/comptrie/comptrie_builder.inl')
-rw-r--r-- | library/cpp/containers/comptrie/comptrie_builder.inl | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/containers/comptrie/comptrie_builder.inl b/library/cpp/containers/comptrie/comptrie_builder.inl index f273fa6571..1e75bbf460 100644 --- a/library/cpp/containers/comptrie/comptrie_builder.inl +++ b/library/cpp/containers/comptrie/comptrie_builder.inl @@ -1104,18 +1104,18 @@ size_t CompactTrieMakeFastLayout(IOutputStream& os, const TTrieBuilder& builder, size_t len = builder.Save(buftmp); return CompactTrieMakeFastLayout<typename TTrieBuilder::TPacker>(os, buftmp.Buffer().Data(), len, verbose); } - -template <class TPacker> + +template <class TPacker> size_t CompactTrieMinimizeAndMakeFastLayout(IOutputStream& os, const char* data, size_t datalength, bool verbose/*=false*/, const TPacker& packer/*= TPacker()*/) { - TBufferStream buftmp; - size_t len = CompactTrieMinimize(buftmp, data, datalength, verbose, packer); - return CompactTrieMakeFastLayout(os, buftmp.Buffer().Data(), len, verbose, packer); -} - -template <class TTrieBuilder> + TBufferStream buftmp; + size_t len = CompactTrieMinimize(buftmp, data, datalength, verbose, packer); + return CompactTrieMakeFastLayout(os, buftmp.Buffer().Data(), len, verbose, packer); +} + +template <class TTrieBuilder> size_t CompactTrieMinimizeAndMakeFastLayout(IOutputStream& os, const TTrieBuilder& builder, bool verbose /*=false*/) { - TBufferStream buftmp; - size_t len = CompactTrieMinimize(buftmp, builder, verbose); - return CompactTrieMakeFastLayout<typename TTrieBuilder::TPacker>(os, buftmp.Buffer().Data(), len, verbose); -} - + TBufferStream buftmp; + size_t len = CompactTrieMinimize(buftmp, builder, verbose); + return CompactTrieMakeFastLayout<typename TTrieBuilder::TPacker>(os, buftmp.Buffer().Data(), len, verbose); +} + |