|
|
|
|
|
by KMag
3752 days ago
|
|
You can have an equally simple implementation (plus one mask operation) if you put the length encoding in the most significant bits. The advantage of having length in the most significant bit is that in the common case (1 byte integers), the decoding is faster. |
|
If it would be as simple, you should be able to easily modify my sample encoder/decoder above to illustrate.