Documenting data-transformation implementations

Within solidity smart contracts, I’ve seen a few repetitions of different data-formatting algorithms like base64 encoding/decoding, JSON, and SVG. Rather than having smart contracts re-implement this logic over and over, I think it would be helpful to document any smart contracts that already exist as standalone Library implementations for any other contract to use (and smart contracts that have some algorithm’s logic baked in that would be good candidates for someone to refactor into a standalone library), so starting here with the few I know of:

Standalone Libraries

Examples


What others exist out there? A key algorithm that I’ve been thinking about trying to implement in Solidity is the DEFLATE (RFC-1951) decoder/decompression algorithm. This would allow data to be saved into a contract’s memory compressed, and then allow view functions to still be able to parse it. Does that exist anywhere out there on-chain already?

1 Like