@singe I ran it on the documentation for libtomcrypt:
$ time qpdf --recompress-flate --compression-level=9 --object-streams=generate crypt-1.18.2.pdf crypt-1.18.2_z9.pdfreal 0m0.257s
user 0m0.225s
sys 0m0.031s
$ LD_PRELOAD=./libzshim.so time qpdf --recompress-flate --compression-level=9 --object-streams=generate crypt-1.18.2.pdf crypt-1.18.2_zopfli.pdf
60.26user 0.11system 1:00.41elapsed 99%CPU (0avgtext+0avgdata 24536maxresident)k
0inputs+0outputs (0major+33070minor)pagefaults 0swaps
ryanc@penguin:~/code/zshim$ ls -al crypt-1.18.2*.pdf
-rw-r--r-- 1 ryanc ryanc 830815 Apr 7 01:17 crypt-1.18.2.pdf
-rw-r--r-- 1 ryanc ryanc 822428 Apr 8 09:13 crypt-1.18.2_z9.pdf
-rw-r--r-- 1 ryanc ryanc 792577 Apr 8 09:32 crypt-1.18.2_zopfli.pdf
zopfli is slow... I did say "brute force".