SharpZipLib problem

  • Thread starter Thread starter Brian Henry
  • Start date Start date
B

Brian Henry

I keep getting this error when decompressing any zip files..

ICSharpCode.SharpZipLib.ZipException: Wrong Local header signature:
0xB023867F

at ICSharpCode.SharpZipLib.Zip.ZipInputStream.GetNextEntry()

at BeneFTPHostService.BeneFTPHostService.ProcessQueue() in
C:\reschinidev\benefits
application\BeneFTPHostService\BeneFTPHostService.vb:line 187

what would cause this? I'm using pretty much the same code as the examples
they provide but it works fine with their code and gives me that error with
mine... here is the code I'm using below.



inputStrm.Password = "Benefits04"

Dim nextEntry As ZipEntry = inputStrm.GetNextEntry()

While Not nextEntry Is Nothing

Try

Dim tmpStrm As New FileStream(Path.Combine(s_foldertostoredate,
nextEntry.Name), FileMode.CreateNew)

Dim tmpBuffer(2048) As Byte

Dim tmpLength As Integer = -1

While True

tmpLength = inputStrm.Read(tmpBuffer, 0, tmpBuffer.Length)

If tmpLength > 0 Then

tmpStrm.Write(tmpBuffer, 0, tmpLength)

Else

Exit While

End If

End While

tmpStrm.Flush()

tmpStrm.Close()

Catch ex As Exception

Debug.WriteLine(ex.ToString)

b_ErrorFlag = True

Finally

nextEntry = inputStrm.GetNextEntry()

End Try

End While

inputStrm.Close()
 
Brian Henry said:
ICSharpCode.SharpZipLib.ZipException: Wrong Local header signature:
0xB023867F

at ICSharpCode.SharpZipLib.Zip.ZipInputStream.GetNextEntry()

at BeneFTPHostService.BeneFTPHostService.ProcessQueue() in
C:\reschinidev\benefits
application\BeneFTPHostService\BeneFTPHostService.vb:line 187

what would cause this? I'm using pretty much the same code as the examples
they provide but it works fine with their code and gives me that error
with mine... here is the code I'm using below.

Notice that there is a sepatate forum for questions about the SharpZipLib
available:

<URL:http://www.icsharpcode.net/OpenSour...?FORUM_ID=16&CAT_ID=8&Forum_Title=SharpZipLib>
 
Back
Top