View Source LibEcto.Base62 (lib_ecto v0.3.10)

Provides functions for encoding and decoding data using the Base62 encoding scheme.

Base62 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It uses a set of 62 characters (0-9, a-z, A-Z) to represent binary data in a way that is safe for use in URLs and other contexts where certain characters may be reserved or have special meaning.

This module provides functions for encoding and decoding binary data or integers using the Base62 encoding scheme. The encode/1 and decode!/1 functions are the primary entry points for encoding and decoding data, respectively.

Example usage:

```
iex> Base62.encode("hello world")
"dGhpcyBpcyBhIHRlc3Q="
iex> Base62.decode!("dGhpcyBpcyBhIHRlc3Q=")
"hello world"
```

Summary

Functions

@spec bin_to_integer(binary()) :: integer()
@spec decode!(binary()) :: binary()
@spec encode(binary() | integer()) :: binary()