0 votes
by (140 points)

Dears please note that I got this error when trying to rename file that is decompressed using DEFLATE64 algorithm

Argument is out of range of valid values. Parameter name: count Actual value was -1. 
at shcnf.dilhs.Write(Byte[] buffer, Int32 offset, Int32 count)
Applies to: Rebex ZIP

1 Answer

0 votes
by (70.3k points)

Thank you for pointing to this.

Would it be possible to share the problematic .zip file with us? I was trying to reproduce the issue, but without success.

You can send the file (or link to download) to support@rebex.net

Can you also please post here, or include in the mail, steps to reproduce the issue?
Something like this:

using (var zip = new ZipArchive(zipFileName))
    zip.Move("input.txt", "renamed.txt");

Thank you.

by (140 points)
Thank you for your response, I have figured out what was going on.
the file was compressed using another library , so when i used Rebex.zip it worked.
Thank you
by (70.3k points)
If I understand it correctly, the scenario was:
- Compress file with 3rd party utility using DEFLATE64.
- Renaming file in archive using Rebex ZIP causes ArgumentOutOfRangeException.

This stills points to an error in Rebex ZIP. If you can provide us with a problematic .zip file, we can fix it. Without that, I cannot reproduce the issue.