# Filesize v. 0.0.1

**URL:** <https://www.ruby-forum.com/t/filesize-v-0-0-1/172706>\
**Category:** Ruby\
**Created:** [July 26, 2009, 10:08am UTC](https://www.ruby-forum.com/t/filesize-v-0-0-1/172706 "2009-07-26T10:08:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [July 26, 2009, 10:08am UTC](https://www.ruby-forum.com/t/filesize-v-0-0-1/172706/1 "2009-07-26T10:08:08Z")

</div>

filesize.rb[1][2] provides a class for easily working with file sizes.  
That means:

- 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[3] for more)
- filesize.rb also provides some default sizes, like the ones of DVDs

Links  
[1] [http://rubyforge.org/projects/filesize/](http://rubyforge.org/projects/filesize/)  
[2] [GitHub - dominikh/filesize: filesize is a small ruby class for handling filesizes with both the SI and binary prefixes, allowing conversion from any size to any other size.](http://github.com/dominikh/filesize/tree/master)  
[3] [http://filesize.rubyforge.org/](http://filesize.rubyforge.org/)
