I think I tracked it down in that ZLibWriteStream, which I used to try to achieve the deflate approach used in PlantUML. It uses an flevel=1 of compression, which is "fast", rather than flevel=2, which is "default". This results in longer URLs because the text is less compressed. I couldn't see any way to influence the kind of compression. Does anyone know of a way?
I think the bug I am hitting is with the PlantUML.com's web server, since the URLs render fine on a PlantUML server running on localhost. But for compatibility, I would like to see if I can avoid the bug by changing how Pharo is doing the compression.