MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / readChunk

Method readChunk

src/OpenLoco/src/S5/SawyerStream.cpp:22–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22std::span<const std::byte> SawyerStreamReader::readChunk()
23{
24 SawyerEncoding encoding;
25 read(&encoding, sizeof(encoding));
26
27 uint32_t length;
28 read(&length, sizeof(length));
29
30 _decodeBuffer.resize(length);
31 read(_decodeBuffer.data(), length);
32
33 return decode(encoding, _decodeBuffer.getSpan());
34}
35
36size_t SawyerStreamReader::readChunk(void* data, size_t maxDataLen)
37{

Callers 5

uncompressFileFunction · 0.80
loadSaveFunction · 0.80
readSaveDetailsFunction · 0.80
readScenarioOptionsFunction · 0.80
findAndPreLoadObjectFunction · 0.80

Calls 4

getSpanMethod · 0.80
resizeMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected