Zstd support for rotated files
Thanks for making this fork! We've been waiting a long time to see someone pick up the mantle, we're going to switch to this library in https://github.com/caddyserver/caddy
One old request was to add zstd support (alongside existing gzip support). See https://github.com/caddyserver/caddy/issues/5843
github.com/klauspost/compress/zstd can be used for this
If you don't want to pull in an additional dependency (totally understandable), I think compression could be offloaded to the calling app, by having an interface that can be optionally plugged into timberjack config with a function that would be invoked whenever a file is being rotated, passing the filename, whether it "should be compressed" (based on its age), etc. We could return a byte stream and new filename or something like that.
Hey @francislavoie i’m happy to contribute to Caddy — I’ll implement this request and start working on it.
@francislavoie timberjack now supports zstd compression. Changes were merged here #43 . Thank you :)
Thanks! We'll add support for that in this PR https://github.com/caddyserver/caddy/pull/7244
I'm closing this issue since this was merged!
Thanks, finally getting got around to implementing it in https://github.com/caddyserver/caddy/pull/7515