RollingFileAppender and RollingRandomAccessFileAppender currently support two compression formats: gzip and zip. Java has built-in support for these formats so these are guaranteed to work without external dependencies.
However, there are formats that give much better compression, for example bzip2 results in 40% smaller files.
At work, we have a requirement to store large log files in smaller format for long term storage. I would like to be able to do this at rollover. Currently we gzip at rollover and have a separate script unzip and bzip2 these files. It would be convenient to be able to use bzip2 directly from log4j at rollover.
We can leverage the work done here: https://commons.apache.org/proper/commons-compress/