diff options
author | Yuri Gorshenin <y@maps.me> | 2017-07-07 13:08:23 +0300 |
---|---|---|
committer | Yuri Gorshenin <y@maps.me> | 2017-07-07 16:18:19 +0300 |
commit | ebf89d7214f9e26bf73a90b17caa6487416eeec2 (patch) | |
tree | 9bba6bbc5bcd4fe019bffe16e85c63a3202c2cde /coding/text_storage.hpp | |
parent | de30819018ce5dfb962638a88e39133857398491 (diff) |
Review fixes.
Diffstat (limited to 'coding/text_storage.hpp')
-rw-r--r-- | coding/text_storage.hpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/coding/text_storage.hpp b/coding/text_storage.hpp index 0f0c50b9d2..ac4f7065ce 100644 --- a/coding/text_storage.hpp +++ b/coding/text_storage.hpp @@ -14,14 +14,17 @@ namespace coding { -// Writes set of strings in a format that allows to access blocks of -// strings. The size of each block roughly equals to the |blockSize|, +// Writes a set of strings in a format that allows to efficiently +// access blocks of strings. This means that access of individual +// strings may be inefficient, but access to a block of strings can be +// performed in O(length of all strings in the block + log(number of +// blocks)). The size of each block roughly equals to the |blockSize|, // because the whole number of strings is packed into a single block. // // Format description: // * first 8 bytes - little endian-encoded offset of the index section // * data section - represents a catenated sequence of BWT-compressed blocks with -// the sequence of individual string lengths in the block +// a sequence of individual string lengths in the block // * index section - represents a delta-encoded sequence of // BWT-compressed blocks offsets intermixed with the number of // strings inside each block. @@ -183,7 +186,7 @@ public: auto const numBlocks = ReadVarUint<uint64_t, NonOwningReaderSource>(source); m_blocks.assign(numBlocks, {}); - uint64_t prevOffset = 8; // 8 bytes for the offset + uint64_t prevOffset = 8; // 8 bytes for the offset of the data section for (uint64_t i = 0; i < numBlocks; ++i) { auto const delta = ReadVarUint<uint64_t, NonOwningReaderSource>(source); |