meta/zstd ? reverse-engineered prompt
Reverse engineered prompt
Build me a fast lossless compression tool in C, with both a reusable library and a command line app.
I want it to compress and decompress files quickly, with a really good balance between speed and size, and to support the main Zstandard format plus reading and writing common compressed files like .zst, .gz, .xz, and .lz4. It should also handle small files well by letting me train a dictionary from sample data, then use that dictionary to improve compression for similar files.
Please make it easy to build from the project root, run local tests, and install the CLI and library cleanly. If you need to check current docs or compatibility details, look them up online. Keep the code organized, with clear examples and basic documentation so someone can use it from the terminal or link it into another program.
Are you gonna build this?
make sure you review the code using coderabbit