qos-ch / logback

The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch
Other
3k stars 1.28k forks source link

#755 XZ compression support added #823

Open kazimirm opened 3 months ago

kazimirm commented 3 months ago

This is the proposed changes to resolve issue #755 to add support for xz compression with default compression level. Recognizing the need for enhanced compression options, these changes aim to provide better compression.

Key points of this merge request:

These changes were implemented conservatively to maintain stability, though there is potential for further refinement.

Please review the proposed changes. Feedback is welcome, and feel free to merge if everything looks good.

Thank you!

alxdlv commented 2 days ago

@ceki can you review the PR?

CC @kazimirm

ceki commented 2 days ago

Why is xz better than the existing zip or gz compressions?

alxdlv commented 2 days ago

@ceki XZ compression offers much higher compression ratio and efficiency than default compression of gz or zip

# ls -lAh
total 24M
-rw-r----- 1 user user 20M Oct  3 00:00 test.log
-rw-r--r-- 1 user user 3.6M Oct  3 00:00 archived.zip
-rw-r--r-- 1 user user 3.3M Oct  3 00:01 archived.gz
-rw-r----- 1 user user 626K Oct  3 00:03 archived.xz

Also XZ iz designed to handle large files more effectively than traditional GZIP/ZIP formats.