filesize.rb provides a class for easily working with file sizes.
- Parsing strings (e.g. “1 GiB”) and saving it internally as bytes
- Handling both SI and binary prefixes
- Converting from any type and unit to any other (SI to SI, SI to Binary
and so on)
- doing calculatings with filesizes (in a smart way, see
documentation for more)
- filesize.rb also provides some default sizes, like the ones of DVDs