<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Zipofig. A story of ZIP archive recovery</title>
	<atom:link href="http://www.literatecode.com/2003/11/30/zipofig/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.literatecode.com/2003/11/30/zipofig/</link>
	<description>Security, Programming and Beyond</description>
	<pubDate>Thu, 09 Sep 2010 15:18:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ilya</title>
		<link>http://www.literatecode.com/2003/11/30/zipofig/comment-page-1/#comment-11668</link>
		<dc:creator>Ilya</dc:creator>
		<pubDate>Fri, 24 Aug 2007 02:37:51 +0000</pubDate>
		<guid isPermaLink="false">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-page-1/#comment-11666</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Fri, 24 Aug 2007 01:33:16 +0000</pubDate>
		<guid isPermaLink="false">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-page-1/#comment-5280</link>
		<dc:creator>il</dc:creator>
		<pubDate>Mon, 14 May 2007 02:22:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.literatecode.com/2003/11/30/zipofig/#comment-5280</guid>
		<description>spike, you may try to define _LARGEFILE64_SOURCE and use
__int64 -&gt; off64_t
_lseek64 -&gt; lseek64
_telli64 -&gt; lseek64(file, 0, SEEK_CUR)
_read -&gt; read
_close -&gt; 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-page-1/#comment-5210</link>
		<dc:creator>spike</dc:creator>
		<pubDate>Sat, 12 May 2007 13:07:20 +0000</pubDate>
		<guid isPermaLink="false">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-page-1/#comment-16</link>
		<dc:creator>Ilya</dc:creator>
		<pubDate>Wed, 22 Nov 2006 13:16:41 +0000</pubDate>
		<guid isPermaLink="false">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-page-1/#comment-14</link>
		<dc:creator>Sergej Howeiler</dc:creator>
		<pubDate>Wed, 22 Nov 2006 12:05:32 +0000</pubDate>
		<guid isPermaLink="false">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-page-1/#comment-13</link>
		<dc:creator>Sergej Howeiler</dc:creator>
		<pubDate>Wed, 22 Nov 2006 12:03:33 +0000</pubDate>
		<guid isPermaLink="false">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>
