magic-trace icon indicating copy to clipboard operation
magic-trace copied to clipboard

destinations.ml: add a compressed_file_destination that uses zstandard

Open Lilydemi opened this issue 3 years ago • 2 comments

Trace files can be large and hard to share. Using zstd to compress trace files allows users to decrease their file sizes, as demonstrated here:

$ du -sh trace.fxt trace.fxt.zst
472K    trace.fxt
56K     trace.fxt.zst

This is a preliminary attempt at adding a compressed file destination. We have some open questions that we want to raise in the PR.

One thing we had to do is we had to make an original_filename labeled argument. This is because, sometimes, magic-trace uses /proc/self/fd/$FD paths as a way to prevent a race condition when serving traces.

Lilydemi avatar Jul 14 '22 18:07 Lilydemi

This addresses #154 (just to link the two)

hlian avatar Jul 20 '22 15:07 hlian

@Xyene ready for rereview if you have free time!

hlian avatar Jul 21 '22 20:07 hlian