Convert integers to a Base64-encoded VLQ string

samandar

Samandar Ravshanov

Posted on July 28, 2019

Convert integers to a Base64-encoded VLQ string

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 ]
Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
samandar
Samandar Ravshanov

Posted on July 28, 2019

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related