Re: zlib interface semi-broken

2009-08-21 Thread Travis
I've come up with a good test for issue5210 and uploaded it to the bug tracker. This patch should be ready for inclusion now. -- Obama Nation | My emails do not have attachments; it's a digital signature that your mail program doesn't understand. | http://www.subspacefield.org/~travis/ If you a

Re: zlib interface semi-broken

2009-02-21 Thread Aahz
In article , Travis wrote: > >So I've submitted a patch to bugs.python.org to add a new member >called is_finished to the zlib decompression object. > >Issue 5210, file 13056, msg 81780 You may also want to bring this up on the python-ideas mailing list for further discussion. -- Aahz (a...@pyt

Re: zlib interface semi-broken

2009-02-12 Thread Travis
So I've submitted a patch to bugs.python.org to add a new member called is_finished to the zlib decompression object. Issue 5210, file 13056, msg 81780 -- Crypto ergo sum. http://www.subspacefield.org/~travis/ Do unto other faiths as you would have them do unto yours. If you are a spammer, pleas

Re: zlib interface semi-broken

2009-02-11 Thread Paul Rubin
Scott David Daniels writes: > >> Seems like we may want to say things like, "synchronization points are > >> too be silently ignored." > No, I mean that we, _the_users_of_the_interface_, may want to say, > That is, I'd like that behavior as an option. I don't see any reason to want that (rat

Re: zlib interface semi-broken

2009-02-11 Thread Scott David Daniels
Scott David Daniels wrote: ... I've wanted to do some low-level (C-coded) search w/o bothering to create strings until a match Here's a more common use case: signature gathering on the contents. --Scott David Daniels scott.dani...@acm.org -- http://mail.python.org/mailman/listinfo/python-li

Re: zlib interface semi-broken

2009-02-11 Thread Scott David Daniels
Paul Rubin wrote: Scott David Daniels writes: I suspect that is why such an interface never came up (If you can clone states, then you can say: "compress this, then use the resultant state to compress/decompress others." The zlib C interface supports something like that. It is just not expo

Re: zlib interface semi-broken

2009-02-11 Thread Scott David Daniels
Paul Rubin wrote: Scott David Daniels writes: Seems like we may want to say things like, "synchronization points are too be silently ignored." That would completely break some useful possible applications, so should be avoided. No, I mean that we, _the_users_of_the_interface_, may want to sa

Re: zlib interface semi-broken

2009-02-11 Thread Paul Rubin
Scott David Daniels writes: > Seems like we may want to say things like, "synchronization points are > too be silently ignored." That would completely break some useful possible applications, so should be avoided. -- http://mail.python.org/mailman/listinfo/python-list

Re: zlib interface semi-broken

2009-02-11 Thread Scott David Daniels
Travis wrote: On Tue, Feb 10, 2009 at 01:36:21PM -0800, Scott David Daniels wrote: I personally would like it and bz2 to get closer to each other... Well, I like this idea; perhaps this is a good time to discuss the equivalent of some "abstract base classes", or "interfaces", for compress

Re: zlib interface semi-broken

2009-02-10 Thread Paul Rubin
Scott David Daniels writes: > I suspect that is why such an interface never came up (If > you can clone states, then you can say: "compress this, then use the > resultant state to compress/decompress others." The zlib C interface supports something like that. It is just not exported to the pyth

Re: zlib interface semi-broken

2009-02-10 Thread Travis
On Tue, Feb 10, 2009 at 01:36:21PM -0800, Scott David Daniels wrote: > >A simple way to fix this would be to add a finished attribute to the > >Decompress object. > Perhaps you could submit a patch with such a change? Yes, I will try and get to that this week. > >However, perhaps this would be a

Re: zlib interface semi-broken

2009-02-10 Thread Scott David Daniels
Paul Rubin wrote: Travis writes: However, perhaps this would be a good time to discuss how [zlib] works... It is missing some other features too, like the ability to preload a dictionary. I'd support extending the interface. The trick to defining a preload interface is avoiding creating a b

Re: zlib interface semi-broken

2009-02-10 Thread Paul Rubin
Travis writes: > However, perhaps this would be a good time to discuss how this library > works; it is somewhat awkward and perhaps there are other changes which > would make it cleaner. > > What does the python community think? It is missing some other features too, like the ability to preload

Re: zlib interface semi-broken

2009-02-10 Thread Scott David Daniels
Travis wrote: The zlib interface does not indicate when you've hit the > end of a compressed stream The underlying zlib functionality provides for this. With python's zlib, you have to read past the compressed data and into the uncompressed, which gets stored in Decompress.unused_data. ...

zlib interface semi-broken

2009-02-10 Thread Travis
Hello all, The zlib interface does not indicate when you've hit the end of a compressed stream. The underlying zlib functionality provides for this. With python's zlib, you have to read past the compressed data and into the uncompressed, which gets stored in Decompress.unused_data. As a result