Compression - decompression algorithm

Compression - decompression algorithm

Post by Kallely Saja » Wed, 25 Jun 2003 02:09:57



This is not really a shell related issue. But I thought I will post it
anyway for lack of a specific newsrooms, and also to hear your comments. May
be making more people aware of the issue might force the technology
providers address the issue.

Here is the issue. Create a directory with the following 6 files in it.

1.         msxml3.dll.6923C101_50F1_498E_99C0_DC2D175C02E5.cab
2.         msxml3a.dll.6923C101_50F1_498E_99C0_DC2D175C02E5.cab
3.         msxml3r.dll.6923C101_50F1_498E_99C0_DC2D175C02E5.cab
4.         msxml3~1.cab
5.         msxml3~2.cab
6.         msxml3~3.cab

Now make a zip file of this directory.  You will see that all the six files
are listed correctly inside the zip.  But when tried to extract them, you
end up with 3 or sometimes only 5 files instead of 6. I contacted few
providers such as WinZip, Filestream, etc., but unfortunately they say that
it is a limitation and they can't do it.

Anybody has any comments?
--

Regards,
Sajan.

PS: Please don't send me emails, use the news room, so that others also will
be benefited.

 
 
 

Compression - decompression algorithm

Post by Timo Kunz » Wed, 25 Jun 2003 03:13:11


Since programs like WinACE and WinRAR can read the content of this archive
correctly and since it doesn't matter whether it's an ACE, RAR or ZIP, I'd
say it's a bug in CreateFile()/MoveFile() or whatever those programs use to
unpack archives. Have you tried calling those APIs yourself in order to
create/move files with those names (just for testing)?

Timo
--
www.TimoSoft-Software.de   Stop TCPA/TCG & NGSCB/Palladium/DRM
www.notcpa.org

 
 
 

Compression - decompression algorithm

Post by Kallely Saja » Wed, 25 Jun 2003 08:37:56


I didn't try calling those APIs. But I can move around this directory using
Windows Explorer without any trouble.

--

Regards,
Sajan.

PS: Please don't send me emails, use the news room, so that others also will
be benefited.


Quote:> Since programs like WinACE and WinRAR can read the content of this archive
> correctly and since it doesn't matter whether it's an ACE, RAR or ZIP, I'd
> say it's a bug in CreateFile()/MoveFile() or whatever those programs use
to
> unpack archives. Have you tried calling those APIs yourself in order to
> create/move files with those names (just for testing)?

> Timo
> --
> www.TimoSoft-Software.de   Stop TCPA/TCG & NGSCB/Palladium/DRM
> www.notcpa.org

 
 
 

Compression - decompression algorithm

Post by Jim Barr » Wed, 25 Jun 2003 08:41:09



> Here is the issue. Create a directory with the following 6 files in it.
[...]
> Now make a zip file of this directory.  You will see that all the six files
> are listed correctly inside the zip.  But when tried to extract them, you
> end up with 3 or sometimes only 5 files instead of 6.

This is because of the way that short filenames are generated. Suppose that the file "msxml3.dll.6923C101_50F1_498E_99C0_DC2D175C02E5.cab" is extracted first. The filesystem also creates the short name "msxml3~1.cab" for it. When "msxml3~1.cab" is subsequently extracted from the archive, WinZip finds that the file already exists. The issue is documented in KB article 195144:

http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B195144

Quote:> I contacted few providers such as WinZip, Filestream, etc., but
> unfortunately they say that it is a limitation and they can't do it.

Seeing as the issue has been worked around in Windows Explorer, it should not be beyond the wit of these other folks to do likewise. Tell them about KB article 195144 and see what they say. The obvious workaround is simply to copy the files with short names first. Of course there is a performance consideration in that the extraction would have to be done in two passes.

--
Jim Barry, MVP for Windows SDK
"For anyone other than its beneficiaries, the only thing
that's missing from the CAP is an 'R'. Reform is urgent..."
Jeremy Paxman, Newsnight, BBC2, 2003-06-17

 
 
 

Compression - decompression algorithm

Post by Kallely Saja » Wed, 25 Jun 2003 09:26:36


Thanks Jim and Timo for your input.
--

Regards,
Sajan.

PS: Please don't send me emails, use the news room, so that others also will
be benefited.



> Here is the issue. Create a directory with the following 6 files in it.
[...]
> Now make a zip file of this directory.  You will see that all the six
files
> are listed correctly inside the zip.  But when tried to extract them, you
> end up with 3 or sometimes only 5 files instead of 6.

This is because of the way that short filenames are generated. Suppose that
the file "msxml3.dll.6923C101_50F1_498E_99C0_DC2D175C02E5.cab" is extracted
first. The filesystem also creates the short name "msxml3~1.cab" for it.
When "msxml3~1.cab" is subsequently extracted from the archive, WinZip finds
that the file already exists. The issue is documented in KB article 195144:

http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B195144

Quote:> I contacted few providers such as WinZip, Filestream, etc., but
> unfortunately they say that it is a limitation and they can't do it.

Seeing as the issue has been worked around in Windows Explorer, it should
not be beyond the wit of these other folks to do likewise. Tell them about
KB article 195144 and see what they say. The obvious workaround is simply to
copy the files with short names first. Of course there is a performance
consideration in that the extraction would have to be done in two passes.

--
Jim Barry, MVP for Windows SDK
"For anyone other than its beneficiaries, the only thing
that's missing from the CAP is an 'R'. Reform is urgent..."
Jeremy Paxman, Newsnight, BBC2, 2003-06-17