MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / GetString

Method GetString

IndexedStorageLib/IndexedStorage.cpp:105–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105std::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
123std::string SnappyStorage::Compress(const std::vector<std::string>& value) const
124{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected