Open the-liquid-metal opened 10 months ago
This is an interesting suggestion, even though I have other plans to address your specific issue. Linked to #49 the idea is to build a local database of already compressed files, so Caesium knows if a file needs to be re-compressed or not.
You suggestion may still be useful in other scenarios, where - for example - you don't want to risk a loss of quality for just a small % of compression.
... to build a local database of already compressed files...
I am not a fan of external meta file:
If there must be metadata, then it must be stored in that file too #237
Some applications already perform compression when manipulating images, so cesium will always perform compression even if the file is already compressed efficiently if the meta file does not exist.
I have a bunch of files which i don't know whether it already compressed or not. Usually i (re)compressed those files to determine the status. This is laborious task and wasting time.
Cesium is able to calculate the percentage of the output file and determine whether the output file is larger than the source file or not. I use these parameters to determine whether my files have been compressed or not. A file is considered compressed if the percentage is close to 0%. I usually use 2% as a threshold.
It would be helpful if Cesium can set configurable threshold to skip overriding/producing already compressed file. Moreover the info text "skipped: below the threshold" shold be shown.