Re: zlib OverflowError: 'size does not fit in an int'

2017-12-04 Thread Larry Martell
On Mon, Dec 4, 2017 at 7:36 PM, Thomas Jollans wrote: > On 05/12/17 01:21, Larry Martell wrote: >> On Mon, Dec 4, 2017 at 7:15 PM, Chris Angelico wrote: >>> On Tue, Dec 5, 2017 at 10:46 AM, Larry Martell >>> wrote: Trying to zip a large file is failing with OverflowError: 'size does n

Re: zlib OverflowError: 'size does not fit in an int'

2017-12-04 Thread Thomas Jollans
On 05/12/17 01:21, Larry Martell wrote: > On Mon, Dec 4, 2017 at 7:15 PM, Chris Angelico wrote: >> On Tue, Dec 5, 2017 at 10:46 AM, Larry Martell >> wrote: >>> Trying to zip a large file is failing with OverflowError: 'size does >>> not fit in an int'. Googling I found this: >>> >>> https://bugs

Re: zlib OverflowError: 'size does not fit in an int'

2017-12-04 Thread Thomas Jollans
On 05/12/17 01:15, Chris Angelico wrote: > On Tue, Dec 5, 2017 at 10:46 AM, Larry Martell > wrote: >> Trying to zip a large file is failing with OverflowError: 'size does >> not fit in an int'. Googling I found this: >> >> https://bugs.python.org/issue23306 >> >> and this: >> >> https://hg.python

Re: zlib OverflowError: 'size does not fit in an int'

2017-12-04 Thread Larry Martell
On Mon, Dec 4, 2017 at 7:15 PM, Chris Angelico wrote: > On Tue, Dec 5, 2017 at 10:46 AM, Larry Martell > wrote: >> Trying to zip a large file is failing with OverflowError: 'size does >> not fit in an int'. Googling I found this: >> >> https://bugs.python.org/issue23306 >> >> and this: >> >> htt

Re: zlib OverflowError: 'size does not fit in an int'

2017-12-04 Thread Chris Angelico
On Tue, Dec 5, 2017 at 10:46 AM, Larry Martell wrote: > Trying to zip a large file is failing with OverflowError: 'size does > not fit in an int'. Googling I found this: > > https://bugs.python.org/issue23306 > > and this: > > https://hg.python.org/cpython/rev/2192edcfea02 > > which seems to make

Re: Zlib: correct checksum but error decompressing

2009-08-26 Thread John Machin
Paul Rubin writes: > > Andre gmail.com> writes: > > I have been trying to solve this issue for a while now. I receive data > > from a TCP connection which is compressed. > > Are you sure it is compressed with zlib? If yes, does it include the > standard zlib header? Some applications save a

Re: Zlib: correct checksum but error decompressing

2009-08-26 Thread Paul Rubin
Andre writes: > I have been trying to solve this issue for a while now. I receive data > from a TCP connection which is compressed. Are you sure it is compressed with zlib? If yes, does it include the standard zlib header? Some applications save a few bytes by stripping the header. See the zli

Re: Zlib: correct checksum but error decompressing

2009-08-26 Thread InvisibleRoads Patrol
On Wed, 26 Aug 2009 07:19:42 -0700 (PDT), Andre wrote: > I have been trying to solve this issue for a while now. I receive data > from a TCP connection which is compressed. I know the correct checksum > for the data and both the client and server generate the same > checksum. However, in Python wh

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. ...

Re: zlib

2007-09-11 Thread Milos Prudek
> > Although I have Python 2.5 with zlib in my Linux disto, I need to install > > my own Python (as most Zope developers do). > > Why? Because Zope often requires Python version slightly older than the most current one. > So why does your own Python version have to be 2.4.4? Because "Plone 3.0

Re: zlib

2007-09-10 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Milos Prudek wrote: > Although I have Python 2.5 with zlib in my Linux disto, I need to install > my own Python (as most Zope developers do). Why? > Zope requires zlib. Python 2.4.4 does not contain zlib. So why does your own Python version have to be 2.4.4? --

Re: zlib and zip files

2006-04-14 Thread Jan Prochazka
Felipe Almeida Lessa napsal(a): >Em Sex, 2006-04-14 às 17:14 +0200, Jan Prochazka escreveu: > > >>Here is my module for parsing zip files: >> >> > >1) Have you checked the source of Python's zipfile module? > > Nice, i thought, that zipfile is written in C, it should be possible to solve

Re: zlib and zip files

2006-04-14 Thread Felipe Almeida Lessa
Em Sex, 2006-04-14 às 17:14 +0200, Jan Prochazka escreveu: > Here is my module for parsing zip files: 1) Have you checked the source of Python's zipfile module? > import struct, zlib > > class ZipHeaderEntry: > name = '' > offset = 0 > uncomlen = 0 > comlen = 0 2) You know that

Re: zlib and zip files

2006-04-14 Thread Jan Prochazka
Michael Ekstrand napsal(a): > Jan Prochazka wrote: > >> Hi, >> I need to decompress zip archive. I wrote a parser of zip file, i obtain >> the compressed data, but when i call zlib.decompress(data) on them, >> it throws this error: >> >> decbuf = decompressor.decompress(compressed_data) >> >> erro

Re: zlib and zip files

2006-04-14 Thread Michael Ekstrand
Jan Prochazka wrote: > Hi, > I need to decompress zip archive. I wrote a parser of zip file, i obtain > the compressed data, but when i call zlib.decompress(data) on them, > it throws this error: > > decbuf = decompressor.decompress(compressed_data) > > error: Error -3 while decompressing: unknow

Re: zlib decode fails with -5

2005-09-29 Thread Paul Watson
"ncf" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I don't mean this harshly, but have you tried recompressing the data to > see if you may have had a bad data set? > > If it still fails, then I'm really not sure why/how zlib decides that > there isn't enough room in the output buf

Re: zlib decode fails with -5

2005-09-27 Thread ncf
I don't mean this harshly, but have you tried recompressing the data to see if you may have had a bad data set? If it still fails, then I'm really not sure why/how zlib decides that there isn't enough room in the output buffer. "Z_BUF_ERROR if there was not enough room in the output buffer" Sorry

Re: zlib written in python

2005-09-20 Thread Scott David Daniels
Andreas Lobinger wrote: > Aloha, > > is a pure _python_ implementation of the zlib available? > I have broken zlib streams and need to patch the deocder to > get them back. > > Wishing a happy day > LOBI > Check your zlib version: import zlib; print zlib.ZLIB_VERSION There were some fixe

Re: zlib + Windows 32 service problem (ImportError)

2005-08-17 Thread John Machin
Laszlo Zsolt Nagy wrote: > | > >> | >> C:\Python24;C:\Python24\DLLs;c:\Python24\Lib\site-packages\win32;c:\oracle\product\10.1.0\db_1\bin;c:\oracle\product\10.1.0\db_1\jre\1.4.2\bin\client;c:\oracle\product\10.1.0\db_1\jre\1.4.2\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:

Re: zlib + Windows 32 service problem (ImportError)

2005-08-17 Thread Laszlo Zsolt Nagy
| >| >C:\Python24;C:\Python24\DLLs;c:\Python24\Lib\site-packages\win32;c:\oracle\product\10.1.0\db_1\bin;c:\oracle\product\10.1.0\db_1\jre\1.4.2\bin\client;c:\oracle\product\10.1.0\db_1\jre\1.4.2\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program >| Files\Common Files\GT

Re: zlib + Windows 32 service problem (ImportError)

2005-08-16 Thread vincent wehren
"Laszlo Zsolt Nagy" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] | vincent wehren wrote: | | >"Laszlo Zsolt Nagy" <[EMAIL PROTECTED]> schrieb im Newsbeitrag | >news:[EMAIL PROTECTED] | >| Sorry, I realized that the import zlib was not executed from my | >| (working) service.

Re: zlib + Windows 32 service problem (ImportError)

2005-08-16 Thread Laszlo Zsolt Nagy
vincent wehren wrote: >"Laszlo Zsolt Nagy" <[EMAIL PROTECTED]> schrieb im Newsbeitrag >news:[EMAIL PROTECTED] >| Sorry, I realized that the import zlib was not executed from my >| (working) service. >| So here is the question: why can't I use zlib from a win32 service? Is >| there any way to make

Re: zlib + Windows 32 service problem (ImportError)

2005-08-15 Thread vincent wehren
"Laszlo Zsolt Nagy" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] | Sorry, I realized that the import zlib was not executed from my | (working) service. | So here is the question: why can't I use zlib from a win32 service? Is | there any way to make it working? | | >---

Re: zlib and zipfile module in Python2.4

2005-04-12 Thread Fredrik Lundh
Bill Anderson wrote: > I recently had this issue and discovered that if zlib headers are not > there, python still builds gzip ... which imports zlib. Seems to me that > since zlib apparently depends on gzip, gzip should only be built if zlib > is. gzip is a Python module, and isn't "built". if

Re: zlib and zipfile module in Python2.4

2005-04-12 Thread Bill Anderson
On Mon, 11 Apr 2005 10:38:37 -0400, Alan Toppen wrote: > I was unable to use the ZipFile class in the zipfile module in > Python2.4. I got an error that zlib could not be found. Comparing my > Python 2.2 installation I noticed Python 2.4 was missing a certain file: > /usr/lib/python2.2/lib-dynload

Re: zlib and zipfile module in Python2.4

2005-04-11 Thread Fredrik Lundh
Alan Toppen wrote: > When running my Python script it gives a warning: > > /usr/local/lib/python2.4/zipfile.py:7: RuntimeWarning: Python C API version > mismatch for module zlib: This Python has C API version 1012, module zlib > has version 1011. > import zlib # We may need its compression metho