Module Bitcoinml.Varint

val parse_varint : Bitstring.t -> Stdint.Uint64.t * Bitstring.t

parse_varint bits parse Bitstring bits returing the Uint64.t value and the rest of the bitstring

val bitstring_of_varint : Stdint.Int64.t -> Bitstring.t

bitstring_of_varint num encodes num to its bitstring varint representation

val encoding_length : Stdint.Uint64.t -> int

encoding_length num returns the length of num if encoded as varint