| 103 | } |
| 104 | |
| 105 | std::string SnappyStorage::GetString(size_t index) |
| 106 | { |
| 107 | auto blockId = GetBlockIndex(index); |
| 108 | auto id = GetRelativeIndex(index); |
| 109 | |
| 110 | if (blockId == m_writeBlockIndex) |
| 111 | { |
| 112 | return m_writeList[id]; |
| 113 | } |
| 114 | |
| 115 | if (blockId != m_readBlockIndex) |
| 116 | { |
| 117 | m_readList = Decompress(m_storage[blockId]); |
| 118 | m_readBlockIndex = blockId; |
| 119 | } |
| 120 | return m_readList[id]; |
| 121 | } |
| 122 | |
| 123 | std::string SnappyStorage::Compress(const std::vector<std::string>& value) const |
| 124 | { |
nothing calls this directly
no outgoing calls
no test coverage detected