[SciPy-user] read/write compressed files
Sat Jun 23 04:02:59 CDT 2007
2007/6/21, Francesc Altet <firstname.lastname@example.org>:
> Ok, that's fine. In any case, I'm interested in knowing the reasons on
> why you are using bzip2 instead zlib. Have you detected some data
> pattern where you get significantly more compression than by using zlib
> for example?.
> I'm asking this because, in my experience with numerical data, I was
> unable to detect important compression level differences between bzip2
> and zlib. See:
> for some experiments in that regard.
> I'd appreciate any input on this subject (bzip2 vs zlib).
Probably not very meaningful, but with ascii data (float as ascii)
bzip2 seems to have a certain degree of advantages (both in speed and
$ du -h lena.txt
$ time gzip -9 lena.txt
real 0m4.937s <=
$ du -h lena.txt.gz
$ time gunzip lena.txt.gz
$ time bzip2 lena.txt
real 0m2.524s <=
$ du -h lena.txt.bz2
$ time bunzip2 lena.txt.bz2
Even if it's usually a bad idea to put numerical data in ascii format,
sometimes may be handy.
More information about the SciPy-user