Skip to content

Add gzip/zstd compression #45

@pawurb

Description

@pawurb

Hi. Would you accept a PR adding compression to revm storage slots (~/.foundry/cache/rpc/mainnet) cache?

I'm working on a project where I want to store revm tracing cache for all the incoming blocks. I'm tracing the last tx from every block, and see cached files up to ~7MB without any compression.

Both gzip and zstd reduce size by ~75%, but zstd seems to be significantly faster (20ms vs 170ms on a sample file) and also offers better compression.

Maybe it could be possible to compress cache files, and decompress only for reading? It would significantly reduce disk usage for projects that rely on storing larger amounts of SharedBackend cache. Could be an optional flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions