pure python data compression (zip)

Guilherme Polo ggpolo at gmail.com
Tue Oct 23 09:14:12 EDT 2007


2007/10/23, Rene Maurer <rmnet at mailc.net>:
> Hallo
>
> I wonder if there are any pure python implementations available/known
> for the zip (or any other) data compression... As far as I know
> python's zlib uses http://www.zlib.net/, which is written in
> C. Unfortunately this is not solution for me, because my target "only"
> has a python interpreter....
>
> I have "googled" for a while, but I don't have found anything useful.
>
> Regards,
> René
> --
> http://mail.python.org/mailman/listinfo/python-list
>

I have implemented Huffman in Python, it is not very fast yet. Further
improvements would requires writing some parts in C and use as a
module in Python, or maybe I just didn't think enough on how to
improve the python code.

If you don't know how huffman works, you may read this:
http://gpolo.ath.cx:81/implements/huffman
I have described the improvements I have done to this "teaching
version" here: http://gpolo.ath.cx:81/texts/opc

If you don't want to read at all, you can search at pypi for "huffman"

It doesn't have all the functionalities of any normal compressor, like
compressing directories, but it could be implemented of course.

Feedback is welcome

-- 
-- Guilherme H. Polo Goncalves



More information about the Python-list mailing list