Adding a compress flag to cfzip and cfzipparam

CFZIP currently doesn’t allow just storing files, it only compresses them

I propose we add compress=(boolean|udf|filter) as an option, basically
the same as the current filter option. when false, the file is only stored

I have had an initial stab at implementing it, but I need some help

https://luceeserver.atlassian.net/browse/LDEV-930

2 Likes

Looking into the source code, for the newish Lucee extension-compress, I noticed support for compressionMethod=“store,deflate” was checked into the code, but just wasn’t exposed via the tag definition.

So, I have filed a PR to enable this

you can see an example in the updated test case

If you’d like to try it out (it works with 5.3.3.x, dunno about earlier releases), I’ve attached a build (compress-extension-1.0.0.2-BETA.lex) to the issue [LDEV-930] - Lucee

This is really useful if you are zipping content which doesn’t need compression, i.e. images

1 Like

I was just talking to my teammate about this the other day – he was concerned that we were burdening the CPU because we were trying to “compress” JPEG/PNG files, which are already compressed. I went to see if there was such an option - to use “store” only - and I couldn’t find anything. This is very timely!

3 Likes

this PR just got merged so the next release of the extension will include this functionality

2 Likes

Very cool! It might take us a while to get to it at work. We’re actually on 5.2.x. Something in the CPU consumption went crazy when we tried upgrading from 5.2 to 5.3, and we didn’t have Platform people available to help us figure out how to tune the Kubernetes container resource allocation. One of these days :crossed_fingers:

1 Like