Friday, May 29, 2009

Tales of the bizarre

Technorati Tags:
I ran into a interesting problem today, we have a automated process that zips a file then emails it to a customer, sounds easy right we build a wrapper around the ICSharpLib ?

The zip file it created could be unzipped with the lib (using ICSharpZip) or by using 7-zip, winzip, etc. But the built in zip tool in windows couldn't handle it, also out customer is a Java shop and java couldn't unzip it and they running Unix servers and unzip complained saying it needed a newer version of PK zip.

Here is were it gets bizarre, I take the zip wrapper lib and my thinking is I'll create a command line tool so they could unzip the file in there app, I compile the project in mono on my Linux Virtual box and when I run my unit tests the zip file worked now.

My first thought was that it was a problem with being complied on a 64 bit box vs a 32 bit system(the virtual system is a 32 bit system), or something like that. I looked into it a bit further, wrote a small app in java to unzip a file for testing my changes, and what it finally ended up being was ICSharplib was creating a zip64 format vs the standard zip format. The windows explorer zip tool and java.util.zip can't deal with a zip64 file.

My real question is why did mono use the standard zip format vs the zip64 format?

I have updated our wrapper lib to use the standard zip by turning off the zip64 and it now works just fine, Just Bizarre.

No comments: