SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

bad zip files

Last post 06-21-2008 8:49 PM by JohnReilly. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-20-2008 8:03 PM

    bad zip files

    I am trying to use sharpziplib with my asp.net website that uses vb.net. When I create a zip file I can use WinRAR to view it and extract it but when I try to use windows folder compression tool, the archive is empty. Here is my code

     

      Dim i As Integer
            Dim s As ZipOutputStream = New ZipOutputStream(File.Create(FilePath & "\zipper.zip"))


            s.SetLevel(5)

            For i = 0 To files.Count - 1

                Dim fs As FileStream = File.OpenRead(files(i).ToString)

                Dim buffer(fs.Length) As Byte

                fs.Read(buffer, 0, buffer.Length)

                Dim entry As ZipEntry = New ZipEntry(files(i).ToString)
                entry.Size = fs.Length + 1

                s.PutNextEntry(entry)
                s.Write(buffer, 0, buffer.Length)


            Next

            s.Finish()
            s.Close()

  • 06-21-2008 8:49 PM In reply to

    Re: bad zip files

     Hi,

    Windows cant handle the archive as its got zip64 features in it.  Check out the property usezip64 which can help you create one that windows can handle if thats possible.  Files greater then 4GB in size cant be handled without using zip64.

    hth, -jr-

     

Page 1 of 1 (2 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.