Simple Backups

Simple Backups

27M Downloads

Clarify `compressionLevel` documentation

iTrooz opened this issue ยท 2 comments

commented

Describe your idea

The documentation for this option is: #The compression level, 0 is no compression (less cpu usage) and takes a lot of space, 9 is best compression (most cpu usage) and takes less space. -1 is default

This tells us what levels from 0 to 9 do, but nothing about the default value, -1. Could you add an explanation for what this value does ?

Thanks !

commented

To be honest, I have no idea. I think it's something like the best balance between speed and compression, something like 5 I guess. Here's a snippet of the Deflater class which uses the config value.
image

The whole Javadoc can be found here: https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/zip/Deflater.html#DEFAULT_COMPRESSION

I can add these notes to the wiki, too. I just need to start the wiki for Simple Backups as soon as possible.

commented

I think it's something like the best balance between speed and compression,

I think adding this to the config in comment would be enough
The final line could be this: #The compression level, 0 is no compression (less cpu usage) and takes a lot of space, 9 is best compression (most cpu usage) and takes less space. -1 is a good balance between speed and compression. -1 is default