A simple library for encoding variable-length quantities.
It currently supports writing a base64-encoded integer to a Buffer. Patches implementing decoding or other forms of encoding are welcome!
Buffer
vlq
let buf = Buffer.create 10 in Vlq.Base64.encode buf 123456789; Buffer.contents buf (* "qxmvrH" *)
This encoding can be used to generate JavaScript sourcemaps.
ocaml-vlq is MIT licensed, as found in the LICENSE file.