<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<META content="MSHTML 6.00.6000.16735" name=GENERATOR></HEAD>
<BODY id=MailContainerBody 
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px" 
bgColor=#ffffff leftMargin=0 topMargin=0 CanvasTabStop="true" 
name="Compose message area">
<DIV><FONT face=Garamond color=#000080><FONT color=#000000>Hi 
Alan</FONT></FONT></DIV>
<DIV><FONT face=Garamond></FONT>&nbsp;</DIV>
<DIV><FONT face=Garamond>A bunch of gzipped files are read with the majority 
working but a few don't.&nbsp; I don't know if these files were originally 
zipped with gzip but I'd guess that they were.</FONT></DIV>
<DIV><FONT face=Garamond></FONT>&nbsp;</DIV>
<DIV><FONT face=Garamond>Strangely, for the files that don't work I 
can&nbsp;read/print the file almost to the end and then it falls over with the 
CRC error.</FONT></DIV>
<DIV><FONT face=Garamond></FONT>&nbsp;</DIV>
<DIV><FONT face=Garamond>Dinesh</FONT></DIV>
<DIV><FONT face=Garamond color=#000080><FONT 
color=#000000></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=Garamond color=#000080><FONT color=#000000><FONT 
color=#000080></FONT>&nbsp;</DIV>
<DIV>
<HR>
</DIV>
<DIV>Message: 5<BR>Date: Mon, 1 Dec 2008 00:57:04 -0000<BR>From: "Alan Gauld" 
&lt;</FONT><A 
title="wlmailhtml:{B3050870-F272-4441-9515-46A8A432472B}mid://00000010/!x-usc:mailto:alan.gauld@btinternet.com&#10;CTRL + Click to follow link" 
href="wlmailhtml:{B3050870-F272-4441-9515-46A8A432472B}mid://00000010/!x-usc:mailto:alan.gauld@btinternet.com">alan.gauld@btinternet.com</A><FONT 
color=#000000>&gt;<BR>Subject: Re: [Tutor] Reading gzip files<BR>To: </FONT><A 
title="wlmailhtml:{B3050870-F272-4441-9515-46A8A432472B}mid://00000010/!x-usc:mailto:tutor@python.org&#10;CTRL + Click to follow link" 
href="wlmailhtml:{B3050870-F272-4441-9515-46A8A432472B}mid://00000010/!x-usc:mailto:tutor@python.org">tutor@python.org</A><BR><FONT 
color=#000000>Message-ID: &lt;</FONT><A 
title="wlmailhtml:{B3050870-F272-4441-9515-46A8A432472B}mid://00000010/!x-usc:mailto:ggvcov$eio$1@ger.gmane.org&#10;CTRL + Click to follow link" 
href="wlmailhtml:{B3050870-F272-4441-9515-46A8A432472B}mid://00000010/!x-usc:mailto:ggvcov$eio$1@ger.gmane.org">ggvcov$eio$1@ger.gmane.org</A><FONT 
color=#000000>&gt;<BR>Content-Type: text/plain; format=flowed; 
charset="iso-8859-1";<BR>reply-type=original<BR><BR><BR>"Dinesh B Vadhia" 
&lt;</FONT><A 
title="wlmailhtml:{B3050870-F272-4441-9515-46A8A432472B}mid://00000010/!x-usc:mailto:dineshbvadhia@hotmail.com&#10;CTRL + Click to follow link" 
href="wlmailhtml:{B3050870-F272-4441-9515-46A8A432472B}mid://00000010/!x-usc:mailto:dineshbvadhia@hotmail.com">dineshbvadhia@hotmail.com</A><FONT 
color=#000000>&gt; wrote<BR><BR>&gt; I'm reading gzip files and writing the 
content out to a text file <BR>&gt; line by line.<BR>&gt;&nbsp; File 
"C:\Python25\lib\gzip.py", line 275, in _read<BR>&gt;&nbsp;&nbsp;&nbsp; 
self._read_eof()<BR>&gt;&nbsp; File "C:\Python25\lib\gzip.py", line 311, in 
_read_eof<BR>&gt;&nbsp;&nbsp;&nbsp; raise IOError, "CRC check failed"<BR>&gt; 
IOError: CRC check failed<BR>&gt;<BR>&gt; I've checked the Python docs and 
online but cannot find a<BR>&gt; solution to the problem.&nbsp; 
Thanks.<BR><BR>At great risk of stating the obvious but have you actually 
checked<BR>that the CRC of the gzipped file is correct? Does the problem 
only<BR>happen with this file or with all gzipped files?<BR><BR>And are the 
files actually zipped by gzip or by some other<BR>"compatible" program? If other 
does it work for genuine<BR>gzipped files?<BR><BR>Just some ideas to play 
with.<BR><BR>Alan G </FONT><BR></DIV></FONT></BODY></HTML>