MCPcopy Create free account
hub / github.com/comaps/comaps / GetCompressionRatio

Function GetCompressionRatio

libs/coding/coding_tests/succinct_ef_test.cpp:52–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50
51template <class T>
52double GetCompressionRatio(vector<T> const & data)
53{
54 succinct::elias_fano_compressed_list efList(data);
55
56 vector<uint8_t> buffer;
57 MemWriter writer(buffer);
58 coding::Freeze(efList, writer, "");
59
60 return data.size() * sizeof(T) / double(buffer.size());
61}
62
63UNIT_TEST(SuccinctEFList_Ratio)
64{

Callers 1

UNIT_TESTFunction · 0.85

Calls 2

FreezeFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected