Compression examples

Ian Bicking ianb at colorstudy.com
Thu Jul 26 12:56:35 EDT 2007


Here's some examples of compression:

A bunch of small HTML files for dictionary words:
$ python ~/src/colorstudy/olpc/jffs2size.py dictionary-words
raw (1 dirs, 948 files)
.htm  947/99%:*********************************************************
Sizes: average 2K, range 613b-12K
        +
        +
        ++
      + +++
    ++++++++ + +
    +++++++++++++    +
+ ++++++++++++++++ ++     ++
+ ++++++++++++++++++++++++++ +
----------------------------------------------------------------------
0                                6K                                12K
   no compression : 2760780, 2760K
   estimated jffs2: 1398650, 1398K (50%)
   mkfs.jffs2     : 1398896, 1398K (50%)
   zipped         : 1301998, 1301K (47%)
   .tar.gz        : 713898, 713K (25%)
   .tar.bz2       : 501851, 501K (18%)


A big directory of help files:
$ python ~/src/colorstudy/olpc/jffs2size.py /usr/share/gnome/help/
/usr/share/gnome/help/ (1067 dirs, 4789 files)
.png 2344/48%:*********************************************************
.xml 2333/48%:********************************************************
.ent   29/ 0%:*
Sizes: average 16K, range 0b-693K
+
+
+
+
++
++
+++
++++
----------------------------------------------------------------------
0                              346K                              693K
   no compression     : 80006228, 80006K
   estimated          : 51708895, 51708K (64%)
   actual (mkfs.jffs2): 52682076, 52682K (65%)
   zipped             : 46683119, 46683K (58%)
   .tar.gz            : 44281773, 44281K (55%)
   .tar.bz2           : 37747607, 37747K (47%)



A sampling of some pages off wiki.laptop.org (everything from 
Category:General Public):
$ python ~/src/colorstudy/olpc/jffs2size.py wiki.laptop.org/
wiki.laptop.org/ (338 dirs, 373 files)
.jpg  155/41%:*********************************************************
.html 140/37%:***************************************************
.gif   39/10%:**************
.png   31/ 8%:***********
.css    5/ 1%:*
.js     2/ 0%:*
.php    1/ 0%:*
Sizes: average 18K, range 14b-319K
+
+ +
+++
++++++
++++++
++++++
+++++++
+++++++ ++
----------------------------------------------------------------------
0                              159K                              319K
   no compression : 6841780, 6841K
   estimated jffs2: 4127199, 4127K (60%)
   mkfs.jffs2     : 4223384, 4223K (61%)
   zipped         : 3690030, 3690K (53%)
   .tar.gz        : 3239937, 3239K (47%)
   .tar.bz2       : 2988600, 2988K (43%)




-- 
Ian Bicking : ianb at colorstudy.com : http://blog.ianbicking.org
             : Write code, do good : http://topp.openplans.org/careers


More information about the Library mailing list