<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.5" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Zipofig. A story of ZIP archive recovery</title>
	<link>http://www.literatecode.com/2003/11/30/zipofig/</link>
	<description>Think it easy</description>
	<pubDate>Fri, 04 Jul 2008 03:46:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.5</generator>

	<item>
		<title>by: Ilya</title>
		<link>http://www.literatecode.com/2003/11/30/zipofig/#comment-11668</link>
		<pubDate>Fri, 24 Aug 2007 02:37:51 +0000</pubDate>
		<guid>http://www.literatecode.com/2003/11/30/zipofig/#comment-11668</guid>
					<description>Hi Dave,

Certainly, you are correct that a directory will be created instead of a file. The proper approach in general is to check the external file attribute field. Although this field might be set to zero if a file came from a standard input (and it was zero in my case). So I found the above solution to be an acceptable compromise. After all, I was not making ultimate software: Zipofig was just a quick hack to recover my data :)</description>
		<content:encoded><![CDATA[<p>Hi Dave,</p>
<p>Certainly, you are correct that a directory will be created instead of a file. The proper approach in general is to check the external file attribute field. Although this field might be set to zero if a file came from a standard input (and it was zero in my case). So I found the above solution to be an acceptable compromise. After all, I was not making ultimate software: Zipofig was just a quick hack to recover my data :)
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Dave</title>
		<link>http://www.literatecode.com/2003/11/30/zipofig/#comment-11666</link>
		<pubDate>Fri, 24 Aug 2007 01:33:16 +0000</pubDate>
		<guid>http://www.literatecode.com/2003/11/30/zipofig/#comment-11666</guid>
					<description>(I'm writing a zip extractor and stumbled over here)

Watch out:

&lt;blockquote&gt;
if ( (Y==0) and (original size from central directory entry==0) and (crc32 from central directory entry==0)) then make directory (S)
&lt;/blockquote&gt;

If you have any zero-length files in the archive, this will create a directory where a file should be.

I'm not sure what the accepted solution is, but I'm currently checking to see if the entry name ends in a slash character (which seems to be a common convention).  For unix, the info-zip extensions may store the D bit as well, but I haven't looked into it that far yet.</description>
		<content:encoded><![CDATA[<p>(I&#8217;m writing a zip extractor and stumbled over here)</p>
<p>Watch out:</p>
<blockquote><p>
if ( (Y==0) and (original size from central directory entry==0) and (crc32 from central directory entry==0)) then make directory (S)
</p></blockquote>
<p>If you have any zero-length files in the archive, this will create a directory where a file should be.</p>
<p>I&#8217;m not sure what the accepted solution is, but I&#8217;m currently checking to see if the entry name ends in a slash character (which seems to be a common convention).  For unix, the info-zip extensions may store the D bit as well, but I haven&#8217;t looked into it that far yet.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: il</title>
		<link>http://www.literatecode.com/2003/11/30/zipofig/#comment-5280</link>
		<pubDate>Mon, 14 May 2007 02:22:43 +0000</pubDate>
		<guid>http://www.literatecode.com/2003/11/30/zipofig/#comment-5280</guid>
					<description>spike, you may try to define _LARGEFILE64_SOURCE and use
__int64 -&#62; off64_t
_lseek64 -&#62; lseek64
_telli64 -&#62; lseek64(file, 0, SEEK_CUR)
_read -&#62; read
_close -&#62; close
Something like this may work.</description>
		<content:encoded><![CDATA[<p>spike, you may try to define _LARGEFILE64_SOURCE and use<br />
__int64 -&gt; off64_t<br />
_lseek64 -&gt; lseek64<br />
_telli64 -&gt; lseek64(file, 0, SEEK_CUR)<br />
_read -&gt; read<br />
_close -&gt; close<br />
Something like this may work.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: spike</title>
		<link>http://www.literatecode.com/2003/11/30/zipofig/#comment-5210</link>
		<pubDate>Sat, 12 May 2007 13:07:20 +0000</pubDate>
		<guid>http://www.literatecode.com/2003/11/30/zipofig/#comment-5210</guid>
					<description>Hi , i was seeking a while for an application like yours but the problem is that i'm under linux and  it's impossible to compile your code because of use of non standard functions ( like _telli64 ) can u try to help me  ?</description>
		<content:encoded><![CDATA[<p>Hi , i was seeking a while for an application like yours but the problem is that i&#8217;m under linux and  it&#8217;s impossible to compile your code because of use of non standard functions ( like _telli64 ) can u try to help me  ?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Ilya</title>
		<link>http://www.literatecode.com/2003/11/30/zipofig/#comment-16</link>
		<pubDate>Wed, 22 Nov 2006 13:16:41 +0000</pubDate>
		<guid>http://www.literatecode.com/2003/11/30/zipofig/#comment-16</guid>
					<description>Yeah, fixed. Thanks, Sergej :)</description>
		<content:encoded><![CDATA[<p>Yeah, fixed. Thanks, Sergej :)
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Sergej Howeiler</title>
		<link>http://www.literatecode.com/2003/11/30/zipofig/#comment-14</link>
		<pubDate>Wed, 22 Nov 2006 12:05:32 +0000</pubDate>
		<guid>http://www.literatecode.com/2003/11/30/zipofig/#comment-14</guid>
					<description>source code can be downloaded, bat the program no</description>
		<content:encoded><![CDATA[<p>source code can be downloaded, bat the program no
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Sergej Howeiler</title>
		<link>http://www.literatecode.com/2003/11/30/zipofig/#comment-13</link>
		<pubDate>Wed, 22 Nov 2006 12:03:33 +0000</pubDate>
		<guid>http://www.literatecode.com/2003/11/30/zipofig/#comment-13</guid>
					<description>Link does not work!</description>
		<content:encoded><![CDATA[<p>Link does not work!
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
