Possible underflow at bytes saved
Javier Gutiérrez Chamorro (Guti) Open source projects
Brought to you by:
nikkho
FileOptimizer displayed this after a job at bytes saved. I don't know for sure, but since this number is close to the max of UInt64, i suspect that an underflow happened and the variable wrapped around. It can happen that compression tools end up creating a bigger file, due to overhead. This could be mitigated by using a signed integer or/and transforming such odd numbers in ViewModel in a way that if file size increase happens, the UI will say +${bytes} increase due to overhead or something, using a simple ternary operator for example