0 votes
by (120 points)
edited

Here are two of my testing method, the first one which push the stream into zip is not working the second one which add disk file into zip it's working. I'd like to know how to make the first one working?

        void TestRebexZip()
    {
        byte[] data = File.ReadAllBytes("../../TextFile1.txt");

        using (ZipArchive zip = new ZipArchive("rebex.zip"))
        {
            MemoryStream ms = new MemoryStream(data);
            //zip.FilePath = "./";
            //textBox1.Text = zip.FilePath;
            zip.AddFile(ms,"t2.eml");

            zip.Save();
        }
    }

    void TestRebexZipLoadFile()
    {
        byte[] data = File.ReadAllBytes("../../TextFile1.txt");

        using (ZipArchive zip = new ZipArchive("rebex_2.zip"))
        {
            //textBox1.Text += "\r\n" + zip.FilePath;
            zip.AddFile("../../TextFile1.txt");

            zip.Save();
        }
    }
Applies to: Rebex ZIP

1 Answer

+1 vote
by (70.2k points)
edited

Unfortunately, when the input comes from a stream, ZipArchive uses the Zip64 feature, but it seems Win XP cannot handle Zip64 archives.

In the current build this behaviour cannot be changed. In upcoming release, which is going to be published next week, default behaviour will be not to use Zip64 feature if possible. Also new option will be added to handle usage of the Zip64 feature.

If you would like to try a beta version, please let us know.

EDIT:

The default behaviour was changed in Build 4060.

Zip64 is no longer used for data added from Stream by default. ZipArchive.Options.Zip64Mode property added to make the behavior configurable.

by (120 points)
I see a new version on the download page, just want to confirm whether it is the right one Build 4050 released 2011-02-02
by (120 points)
We had a lot of customers who use xp and built-in zip tools, they complain about this issue, when we use SharpLibzip. That's why we purchase this component.
by (70.2k points)
The Build 4050 is without the Zip64 behaviour modification. It will be added in new build which will be released next week. We let you know on your email.
by (120 points)
Any update for that?
by (70.2k points)
We released new Build 4060 (yesterday evening/today morning). I have just send you an email. If interested see our blog http://blog.rebex.net/news/archive/2011/02/15/build-4060.aspx
...