Should I use a zstd dictionary?

Small messages compress badly on their own because each one starts from nothing. A trained dictionary gives every message the same head start. Paste a few hundred real messages (log lines, JSON events, API responses) and this page trains dictionaries of several sizes on most of them, then compresses the rest one at a time, with and without. It's libzstd 1.5.7 compiled to WebAssembly, running here in your browser.

How to read it

The split into training and test messages is random but fixed, so the same input gives the same answer. With very few messages the test set is small and the numbers are noisy. The measurements behind the notes: a zstd dictionary needs fewer samples than you think.