EVB变长编码算法如下
do
encodedByte = X MOD 128
X = X DIV 128
// if there are more data to encode, set the top bit of this byte
if ( X > 0 )
encodedByte = encodedByte OR 128
endif
‘output’ encodedByte
while ( X > 0 )
MOD是模运算,DIV是整数除法,OR是位操作或(C语言中分别是%,/,|)