aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/containers/comptrie/write_trie_backwards.cpp
diff options
context:
space:
mode:
authorsereglond <sereglond@yandex-team.ru>2022-02-10 16:47:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:46 +0300
commiteb3d925534734c808602b31b38b953677f0a279f (patch)
tree4222ef8dc375ee9f30b68a004ee42a0845e005b6 /library/cpp/containers/comptrie/write_trie_backwards.cpp
parent4c8065245df3ea26b7757bcb1f8218df287f9148 (diff)
downloadydb-eb3d925534734c808602b31b38b953677f0a279f.tar.gz
Restoring authorship annotation for <sereglond@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/containers/comptrie/write_trie_backwards.cpp')
-rw-r--r--library/cpp/containers/comptrie/write_trie_backwards.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/library/cpp/containers/comptrie/write_trie_backwards.cpp b/library/cpp/containers/comptrie/write_trie_backwards.cpp
index fd8c28b0ed..9b124310dc 100644
--- a/library/cpp/containers/comptrie/write_trie_backwards.cpp
+++ b/library/cpp/containers/comptrie/write_trie_backwards.cpp
@@ -6,7 +6,7 @@
#include <util/generic/buffer.h>
#include <util/generic/vector.h>
-namespace NCompactTrie {
+namespace NCompactTrie {
size_t WriteTrieBackwards(IOutputStream& os, TReverseNodeEnumerator& enumerator, bool verbose) {
if (verbose) {
Cerr << "Writing down the trie..." << Endl;
@@ -37,7 +37,7 @@ namespace NCompactTrie {
Y_ASSERT(nodelength <= bufferLength);
resultLength += nodelength;
-
+
if (chunkLength + nodelength <= chunksize) {
chunkLength += nodelength;
memcpy(chunkend - chunkLength, buffer, nodelength);
@@ -55,11 +55,11 @@ namespace NCompactTrie {
resultData.push_back(new char[chunksize]);
chunkend = resultData.back() + chunksize;
}
-
+
memcpy(chunkend - chunkLength, buffer, chunkLength);
- }
+ }
}
-
+
if (verbose)
Cerr << counter << Endl;
@@ -79,7 +79,7 @@ namespace NCompactTrie {
char* data = const_cast<char*>(trie.Data);
char* end = data + trie.Length;
char* pos = end;
-
+
TVector<char> buf(64);
while (enumerator.Move()) {
size_t nodeLength = enumerator.RecreateNode(nullptr, end - pos);