More: https://en.wikipedia.org/wiki/Variable-length_quantity
from functorflow import ff
r = ff('vlq').encode(123)
print(r) # '2H'
r = ff('vlq').encode([ 123, 456, 789 ])
print(r) # '2HwcqxB'
r = ff('vlq').decode( '2HwcqxB' )
print(r) # [ 123, 456, 789 ]
Top comments (0)