Skip to content

NethermindEth/cairo_zstd

Repository files navigation

cairo-zstd

This is a Cairo v1 port of a zstd decompressor. The code is heavily and purposely based on the zstd-rs project, except that it's now Cairo.

STARK-provable decompression here we go!

Still a WIP.

Current development state

  • Main implementation porting
  • Decoding tests
  • Dictionary support
  • Optimizations and benchmarking

Testing

In order to generate the decode corpus test files, first run the test generation script:

node ./script/generate_decode_corpus_tests.js

This will generate a decoding test for each of the files in data/decode_corpus which are at or below the set file size in the script. The test generation is a temporary workaround to embed the original/compressed file contents in a cairo file while we're not using a runner that supports a read file-like cheatcode for testing.

At this point, simply run:

scarb test

About

Cairo v1 port of a Zstandard decompressor (WIP)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published