Skip to content

Latest commit

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Recursive Length Prefix (RLP) encoding

This is a simple implementation of the RLP encoding in Rust. I am writing this to understand the basics of rlp encoding and decoding. This is not a full implementation of the Ethereum RLP encoding.

Usage

use rlp::{encode, decode, types::RLPItem};fnmain(){let data:RLPItem = vec!["hello".into(),"world".into()].into();let encoded = encode(&data);let decoded = decode(&encoded);assert_eq!(data, decoded);}

I have taken the inspiration from: https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/

About

Recursive-length prefix (RLP)

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages