473,321 Members | 1,778 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

pure python data compression (zip)

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é
Oct 23 '07 #1
2 1987
2007/10/23, Rene Maurer <rm***@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
Oct 23 '07 #2
Guilherme Polo writes (23.10.2007):
2007/10/23, Rene Maurer <rm***@mailc.net>:
>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 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
Thank you very much. I will have a look this and try it out.
Regards,
René
Oct 23 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Andrew Dalke | last post by:
Is there an author index for the new version of the Python cookbook? As a contributor I got my comp version delivered today and my ego wanted some gratification. I couldn't find my entries. ...
1
by: deejaay | last post by:
Hello, I following an example on how to zip files from the www.devshed.com site. I can create a zip package, however I am not getting any compression. 120M file stays 120M within the zip package....
25
by: Xah Lee | last post by:
Python Doc Problem Example: gzip Xah Lee, 20050831 Today i need to use Python to compress/decompress gzip files. Since i've read the official Python tutorial 8 months ago, have spent 30...
3
by: dermot | last post by:
Last year, I wrote a pure VB compression program because there didn't seem to be anything like this. It is not zip- compatible because it uses newer (industry-tested, well known) algorithms, but...
6
by: sri2097 | last post by:
Hi, I'm trying to zip a particular fiolder and place the zipped folder into a target folder using python. I have used the following command in 'ubuntu'. zip_command = 'zip -qr %s %s' % (target,...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 378 open ( +3) / 3298 closed (+34) / 3676 total (+37) Bugs : 886 open (-24) / 5926 closed (+75) / 6812 total (+51) RFE : 224 open...
2
by: TerryStone | last post by:
Thanks to anyone who reads this. Below is some C# that compresses an array of bytes, and then decompresses, and compares the original data with the new. Firstly, the length of the decompressed...
4
by: Pacino | last post by:
Hi, everyone, I am wondering whether it's possible to read part (e.g. 1000*1000) of a huge jpeg file (e.g. 30000*30000) and save it to another jpeg file by pure python. I failed to read the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.