MCPcopy Create free account
hub / github.com/TheRealMJP/SHforHLSL / encodeVByte

Function encodeVByte

SHTest/Externals/meshoptimizer/indexcodec.cpp:85–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85static void encodeVByte(unsigned char*& data, unsigned int v)
86{
87 // encode 32-bit value in up to 5 7-bit groups
88 do
89 {
90 *data++ = (v & 127) | (v > 127 ? 128 : 0);
91 v >>= 7;
92 } while (v);
93}
94
95static unsigned int decodeVByte(const unsigned char*& data)
96{

Callers 2

encodeIndexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected