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

Method ReadRecord

libs/coding/var_record_reader.hpp:16–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14 explicit VarRecordReader(ReaderT const & reader) : m_reader(reader) {}
15
16 std::vector<uint8_t> ReadRecord(uint64_t const pos) const
17 {
18 ReaderSource source(m_reader);
19 ASSERT_LESS(pos, source.Size(), ());
20 source.Skip(pos);
21 uint32_t const recordSize = ReadVarUint<uint32_t>(source);
22 std::vector<uint8_t> buffer(recordSize);
23 source.Read(buffer.data(), recordSize);
24 return buffer;
25 }
26
27 template <class FnT>
28 void ForEachRecord(FnT && fn) const

Callers 2

UNIT_TESTFunction · 0.80
GetByIndexMethod · 0.80

Calls 4

SizeMethod · 0.45
SkipMethod · 0.45
ReadMethod · 0.45
dataMethod · 0.45

Tested by 1

UNIT_TESTFunction · 0.64