Source
Edit
A variable length integer encoding implementation inspired by SQLite.
Unstable API.
maxVarIntLen = 9
-
the maximal number of bytes a varint can take
Source
Edit
proc writeVu64(z: var openArray[byte]; x: uint64): int {....raises: [], tags: [],
forbids: [].}
-
Write a varint into z. The buffer z must be at least 9 characters long to accommodate the largest possible varint. Returns the number of bytes used.
Source
Edit