Подробнее: 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 ]
Оригинал: “https://dev.to/samandar/convert-integers-to-a-base64-encoded-vlq-string-5fli”