Compression may be negative, fix calculation to display correct value.
Dividing a negative int by a positive can have unexpected behavior - C99 requires "truncation towards zero". This was to an incorrect output of: sbcast: File compressed from 104857600 to 104889678 (40 percent) in 2160081 usec when testing with a file of random data. This is actually negative 0 (point something that was truncated) compression, not "40".
Please register or sign in to comment