SharpDevelop Community

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

Header Checksum Is Invalid

Last post 08-31-2017 1:11 AM by shantanu24july@gmail.com. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 08-31-2017 1:11 AM

    Header Checksum Is Invalid

    Hi ,

     I am trying to unzip a *.tbz file on my windows machine. THis is the decription of the file -  The feed files are archived into binary files in a compressed PKZip (WinZip) format. The compressed file is named according to the following template:

    iYYYYMMDDHH.zip
    pYYYYMMDDHH.zip
    mYYYYMMDDHH.zip

    Here is the code whcih I am using -

                DirectoryInfo dic = new DirectoryInfo(@"C:\AppleStuff\AllFiles\");

                FileInfo[ files = dic.GetFiles("*.tbz", SearchOption.AllDirectories);

                string ExtractedFolder = @"C:\AppleStuff\Extracted";

                foreach (FileInfo file in files)
                {

                    Stream inStream = File.OpenRead(file.FullName);

                    TarArchive tarArchive = TarArchive.CreateInputTarArchive(new BZip2InputStream(inStream));
                    tarArchive.ExtractContents(ExtractedFolder);
                    tarArchive.Close();               

                    inStream.Close();
                }

    at TarArchive.ExtractContents I keep on getting the    "ICSharpCode.SharpZipLib.Tar.TarException: 'Header checksum is invalid' exception. Its being thrown at -  ICSharpCode.SharpZipLib.Tar.TarInputStream.GetNextEntry()

     

     Any idea what might be going wrong ?

     

     

     

     

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