[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Bytes](https://evolu.dev/docs/api-reference/common/Bytes) › decodeNonNegativeInt

```ts
function decodeNonNegativeInt(
  buffer: Buffer,
): number &
  Brand<"NonNaN"> &
  Brand<"Finite"> &
  Brand<"Int"> &
  Brand<"NonNegative">;
```

Defined in: [packages/common/src/Bytes.ts:349](https://github.com/evoluhq/evolu/blob/dd96d79f1dbe9a49fa12ce8e0aa7d3d0177795ca/packages/common/src/Bytes.ts#L349)

Decodes a non-negative integer from a variable-length integer format.

https://en.wikipedia.org/wiki/Variable-length_quantity