<?xml version="1.0" encoding="windows-1252"?>
<node id="632775" title="Re: Archive::Zip Problem: Zip versus Jar file formats" created="2007-08-15 11:50:01" updated="2007-08-15 07:50:01">
<type id="11">
note</type>
<author id="271524">
jimbojones</author>
<data>
<field name="doctext">
Hi&lt;p&gt;

The [mod://Archive::Zip] module will not compress members if the uncompressed size is 0. However, the &lt;c&gt;jar&lt;/c&gt; command seems to add an additional "external local header" to the data.&lt;p&gt;

So, when &lt;c&gt;A::Z&lt;/c&gt; writes out the data, since it thinks it's 0 bytes, it writes out uncompressed, but also writes ou the external header(?), giving you the "only DEFLATED entries can have EXT descriptor" error.&lt;p&gt;

This link seems to show something similar in python that might have some insights:&lt;p&gt;

[http://mail.python.org/pipermail/python-bugs-list/2007-June/038900.html]&lt;/P&gt;

I tested this with &lt;c&gt;A::Z&lt;/c&gt; v1.20, and I think it's a bug with A::Z. I was poking around in &lt;c&gt;A::Z::Member::rewindData&lt;/c&gt; to see what it does with 0 byte compressed data.&lt;p&gt;

Also, running zip against the file gives:&lt;p&gt;

&lt;c&gt;
&gt;zip bar.jar
        zip warning: extended local header not found for META-INF/

zip error: Zip file structure invalid (bar.jar)
&lt;/c&gt;

 Hope this helps, Jim&lt;p&gt;
</field>
<field name="root_node">
632286</field>
<field name="parent_node">
632286</field>
</data>
</node>
