SharpDevelop Community

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

Library cannot extract this entry. Version required is (16660)

Last post 08-22-2008 8:18 AM by Devaraja. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 08-07-2008 5:04 PM

    Library cannot extract this entry. Version required is (16660)

    Hi,

    I am getting above error while trying to unzip the files using SharpZipLib dll. it works for some zipfiles and for some zipfiles its throwing the above error.  i am using the latest dll version  0.85.4.369, still getting the above error.

    using (ZipInputStream s = new ZipInputStream(File.OpenRead(ZipFilePath)))

    {

    ZipEntry theEntry;

    while ((theEntry = s.GetNextEntry()) != null)

    {

    string directoryName = Path.GetDirectoryName(ZipFilePath);

    string fileName = Path.GetFileName(theEntry.Name);

    if (fileName != String.Empty)

    {

    sRet =
    Path.Combine(directoryName, fileName);using (FileStream streamWriter = File.Create(sRet))

    {

    //int size = 2048;

    //byte[ data = new byte[2048];

    int size = 4096;

    byte[ data = new byte[4096];

    while (true)

    {

    size = s.Read(data, 0, data.Length);

    if (size > 0)

    {

    streamWriter.Write(data, 0, size);

    }

    else

    {

    break;

    }

    }

    }

    }

    }

    }

     

    Plz Can anybody help?

    Thanks

    Dev

  • 08-08-2008 6:31 AM In reply to

    Re: Library cannot extract this entry. Version required is (16660)

    That seems a bit wonky.  Version required should be like 45 or something.  Are the files valid zip files?  If they are then something is awry in that lot.

    hth, -jr-

     

  • 08-11-2008 7:39 AM In reply to

    Re: Library cannot extract this entry. Version required is (16660)

    John,

     Yes, the files are valid zip files, i can able to extract from windows manually but not thro code, while doing am getting above error.

    I downloaded the source and set VERSION_MADE_BY to 16660; in ZipConstants.cs class and added (Version == 16660) in version ckecking in ZIpEntry class. Its working now but am not sure was that the correct way.

     If anybody find correct fix for this, plz let me know......

    Thank you John.....

     Thanks & Regards

    Devaraja

  • 08-11-2008 12:11 PM In reply to

    Re: Library cannot extract this entry. Version required is (16660)

    Hi,

    In that case the zip file is well formed apart from the version required being wrong.  Do you know what program was used to create the archives?

    I also wonder if there are any differences between the local and central headers that allow this to work.   It would be interesting to see the output from AEX or similar program (http://www.geocities.com/licamft/) showing the two sets of headers.

    Cheers, -jr-

  • 08-11-2008 12:53 PM In reply to

    Re: Library cannot extract this entry. Version required is (16660)

     

    The zip files are created by dot net application using  ZipForge dll....

    Thanks

    Dev

     

  • 08-20-2008 10:10 PM In reply to

    Re: Library cannot extract this entry. Version required is (16660)

    Is there a small example we can have a look at anywhere?

  • 08-21-2008 7:38 AM In reply to

    Re: Library cannot extract this entry. Version required is (16660)

    hi,

    I downloaded the source for the version  0.85.4.369 and changed the code in Zipentry.cs like below..

    if (versionToExtract != 0) {

    //return versionToExtract; // original

    return versionToExtract & 0xff; // changed

     In the  above code 16660 is converted into 20 and it works, means unzips properly before wasn't happening ......

     am not sure wether it affects other functionality.

    But the problem is, am also zipping 1 text file from the above fix and sending it to php page. The php page returns error message like  

    <br />

    <b>Warning</b>: fopen(20080821105758882.txt) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory in <b>/u2/doc/data_capture.php</b> on line <b>425</b><br />

    Cannot open file

     This is happening after the above change in code i have made.

    I am really confused.... plz help me out...

     

    Thanks

    Dev

  • 08-21-2008 8:01 AM In reply to

    Re: Library cannot extract this entry. Version required is (16660)

    Hey,

    If I removed that fix also its happening, means php page is throughing error for the files zipped by SharpZipLib dll version 0.85.4.369.

    Plz suggest me the solution.....

     Let me know if you need anything additional......

    Thanx

    Dev

  • 08-21-2008 9:31 PM In reply to

    Re: Library cannot extract this entry. Version required is (16660)

    Hi,

    Is there a small example file that we can look at?

     

    Also note that there is a new version of the library which has a pile of fixes although I doubt it will handle this problem.

    Cheers, -jr-

  • 08-22-2008 8:18 AM In reply to

    Re: Library cannot extract this entry. Version required is (16660)

    Hi John,
     
    I am attaching the sample file, its  created with the version 0.85.4.369...  This file(20080822105336749.zip) is not unzipping by php page....
     
    am also attaching the the file(6071957.zip) which is not unzipping by Sharpziplib.....
     
    Hey replied to notification i recieved to my mail, am able to send across the file (607195) but my gmail is not allowing to send the other file 920080822105336749.zip)..  So if provide ur mailid i can sent to you through my rediffmail id.....
     
     
    Thanks
    Dev
     
     
Page 1 of 1 (10 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.