# gvarint
[](https://hex.pm/packages/gvarint)
[](https://hexdocs.pm/gvarint/)
Gleam bindings for the Elixir [`varint`](https://hex.pm/packages/varint) package.
```sh
gleam add gvarint@1
```
```gleam
import gvarint
pub fn main() -> Nil {
// Encode a number into a bitarray
let bytes = gvarint.encode(120_000)
// -> <<192, 169, 7>>
// Decode a number from a bitarray
let num = gvarint.decode(<<192, 169, 7>>)
// -> #(120_000, <<>>)
}
```
## Development
```sh
gleam test # Run the tests
```