This is a standard for encoding arbitrary(ish)-depth lists of lists of … of lists of bytestrings, as a single bytestring. -type decoded_data() :: binary() | [decoded_data()]. -spec encode(Data) -> RLP when Data :: decoded_data(), RLP :: binary(). -spec decode(RLP) -> {Data, Rest} when RLP :: binary(), Data :: decoded_data(), Rest :: binary(). Ethereum’s docs are […]
Author: pharpend
Base64 v. Base58 with code in Erlang and TypeScript
Base64 and Base58 are two algorithms for encoding byte arrays to plain text. I initially assumed these were two instances of the same “Base N” algorithm. This is not the case. These are two fundamentally different algorithms. Base64 is simpler. It treats your byte array as a stream of bytes. It encodes 3 bytes at […]