This is a silly snippet of caddy config file to send heavily compressed huge files to clients prodding "stupid" URLs. (idea from https://tech.lgbt/@becomethewaifu/111879788755441482)
This needs a directory with 3 precompressed files, which may be created like this (tune numbers if you have more/less bandwith to spare or want to annoy "visitors" more/less):
dd if=/dev/zero bs=1M count=10240 status=progress | gzip -9 > 42.gzip
dd if=/dev/zero bs=1M count=102400 status=progress | brotli > 42.br
dd if=/dev/zero bs=1M count=102400 status=progress | zstd -9 -T0 > 42.zstd
I got these compression ratios:
File | Compressed | Uncompressed |
---|---|---|
42.gzip | 9.937 MiB | 10 GiB |
42.br | 82.032 KiB | 100 GiB |
42.zstd | 3.17 MiB | 100 GiB |
@sussycatgirl Updated. Thanks.