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

Method writeChunk

src/OpenLoco/src/S5/SawyerStream.cpp:208–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208void SawyerStreamWriter::writeChunk(SawyerEncoding chunkType, const void* data, size_t dataLen)
209{
210 auto encodedData = encode(chunkType, std::span(static_cast<const std::byte*>(data), dataLen));
211 write(&chunkType, sizeof(chunkType));
212 write(static_cast<uint32_t>(encodedData.size()));
213 write(encodedData.data(), encodedData.size());
214}
215
216void SawyerStreamWriter::write(const void* data, size_t dataLen)
217{

Callers 3

uncompressFileFunction · 0.45
exportGameStateFunction · 0.45
writePackedObjectsFunction · 0.45

Calls 3

writeFunction · 0.85
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected