Recursive Length Prefix¶
The Recursive Length Prefix (RLP) encoding scheme is a space efficient object serialization scheme used in Ethereum.
The RLP encoder defined two supported types:
The list type can be nested an arbitrary number of times allowing complex data structures to be encoded.
Within web3j, RLP encoding is used to encode Ethereum transaction objects into a byte array which is signed before submission to the network. The transaction types and signing logic are located within the Crypto module, with the TransactionEncoderTest providing examples of transaction signing and encoding.
This is a very lightweight module, with no other dependencies. The hope is that other projects wishing to work with Ethereum's RLP encoding on the JVM or Android will choose to make use of this module rather then write their own implementations.