Deflate compression

Some APIs require data to be compressed using the deflate algorithm together with base64 encoding. (e.g. PlanUML, Korki). However, Zola doesn’t support it.

What do you think about adding two new filters: deflate_compress and deflate_decompress?

1 Like

Hi bemyak,

for some API’s these features would very useful.

You can use Kroki already. when you use the POST api(supported in Zola since 0.14) of Kroki you do not need to compress your data.

You see an example in the docs: Zola remote content

For more details see the kroki docs on POST: Kroki!

Hi, @Marco !

That’s what I’m using right now. I embed my diagrams as SVG files right into HTML, so that text could be copied. Alongside with this, I’d like to have an Open as image button, that would open the PNG version in a new tab. To make it work, I need to put a link there, which means I need a GET request.

Ah that makes sense.
That would be possible with your suggested filters.

I created a Pull Request with the implementation: Add defalte filters by bemyak · Pull Request #1622 · getzola/zola · GitHub