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

Method Compress

IndexedStorageLib/IndexedStorage.cpp:123–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123std::string SnappyStorage::Compress(const std::vector<std::string>& value) const
124{
125 std::vector<char> raw;
126 for (auto& s : value)
127 {
128 for (auto t : s)
129 {
130 raw.push_back(t);
131 }
132 raw.push_back('\0');
133 }
134 std::string data;
135 snappy::Compress(&raw[0], raw.size(), &data);
136 return data;
137}
138
139std::vector<std::string> SnappyStorage::Decompress(const std::string& value) const
140{

Callers

nothing calls this directly

Calls 2

CompressFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected