/go-vlq

A VLQ Encoder/Decoder for golang

Primary LanguageGo

Base64 VLQ Encode/Decode in Golang

Test

References:

Why?

I wanted to parse JS sourcemaps in golang and understand how they really worked. I could not find a good vlq encoder/decoder in golang that I could understand so I wrote my own.

Usage

import github.com/sampsonbryce/go-vlq

toEncode := []int{0, 0, 0, 0}
encoded := vlq.Encode(toEncode) // AAAA

decoded := vlq.Decode(encoded) // [0, 0, 0, 0]