SharpZipLib icon indicating copy to clipboard operation
SharpZipLib copied to clipboard

.z file decompress throw exception, header byte 0x1f, 0x9d, 0x90,0x23, winrar and 7z tools open success.

Open HenryHo2006 opened this issue 2 months ago • 0 comments

Describe the bug

use LzwInputStream decompree a .z file failed,header byte 0x1f, 0x9d, 0x90,0x23, bug winrar and 7z tools decompress success. ICSharpCode.SharpZipLib.Lzw.LzwException:“corrupt input: code=52133, freeEnt=50090”

https://github.com/HenryHo2006/NewNNI/releases/download/Release/features_1f9d.z

Reproduction Code

No response

Steps to reproduce

        using FileStream fs = File.OpenRead(@"D:\features_1f9d.z");
        using LzwInputStream lzw = new LzwInputStream(fs);
        MemoryStream dec_ms = new MemoryStream();
        byte[] buf = new byte[4096];
        int read;
        while ((read = lzw.Read(buf, 0, buf.Length)) > 0)
        {
            dec_ms.Write(buf, 0, read);
        }

Expected behavior

ignore

Operating System

No response

Framework Version

No response

Tags

No response

Additional context

No response

HenryHo2006 avatar Nov 02 '25 10:11 HenryHo2006