Lymphatus / CaesiumPH

Lossless JPEG compression for photographers and webmasters
http://saerasoft.com/caesium/ph
GNU General Public License v3.0
90 stars 11 forks source link

Overflow of cumulative filesize for big collection #8

Closed Cabu closed 8 years ago

Cabu commented 8 years ago

Here is the status line I got when i compressed my photo library:

Compression completed! 3046 files compressed in 32:26 minutes, from -1714434741 bytes to -2085356967 bytes. Saved 353.74 Mb (-21.6%)

Folder original disk size: 19 772 162 431 bytes with 5 283 Files in 159 Folders Folder recompressed disk size: 19 408 586 881 bytes

Lymphatus commented 8 years ago

Issue in the function converting the number of bytes to a human readable size:

File: utils.h

QString toHumanSize(int);

Your value is way over the int32 biggest integer, causing overflow. Also, the function does not support formatting Gigabytes' order file sizes.