MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / EncodeSV4

Function EncodeSV4

src/openrct2/sawyer_coding/SawyerCoding.cpp:114–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112 }
113
114 size_t EncodeSV4(const uint8_t* src, uint8_t* dst, size_t length)
115 {
116 // Encode
117 size_t encodedLength = EncodeChunkRLE(src, dst, length);
118
119 // Append checksum
120 uint32_t checksum = CalculateChecksum(dst, encodedLength);
121 *(reinterpret_cast<uint32_t*>(&dst[encodedLength])) = checksum;
122
123 return encodedLength + 4;
124 }
125
126 size_t DecodeTD6(const uint8_t* src, uint8_t* dst, size_t length)
127 {

Callers

nothing calls this directly

Calls 2

EncodeChunkRLEFunction · 0.85
CalculateChecksumFunction · 0.85

Tested by

no test coverage detected