Cannot extract GZIP files if compressed file in archive is binary

0

Hi,

I am having some trouble with the GZIP part of the zip component.

Sometimes when I try to extract a file from a GZIPPED archive, I get an error:

Unhandled Exception: ComponentPro.Compression.ZipException: Invalid checksum. The archive is damaged.

It usually happens when the file inside the archive is binary and not ASCII. But it is possible for me to extract and use the file with gunzip with no issues at all.

Any ideas?

Thank you,

 

zip
edited 12/3/2017 2:08:56 AM
asked 10/13/2014 3:31:46 AM
add a comment

8 Answers

0

What version are you using? Does that happen to all bin files? If no please send us (support@componentpro.com) the bin file to test

 
answered 11/16/2017 12:41:37 AM
add a comment
0

Hi,

Any update\feedback on this.

Thank you

 
answered 11/16/2017 12:41:37 AM
add a comment
0

The current version does not have the Invalid checksum error on that file. However it represents the compressed file as "file" and that issue has been addressed and its fix will be included in our next release. At the moment  you can use ExtractAll method to extract GZip archive.

 
answered 11/16/2017 12:41:37 AM
add a comment
0

The issue has been fixed. We will release a new version soon.

 
answered 11/16/2017 12:41:37 AM
add a comment
0

The last block of the file data cannot be extracted using Zlib library. However WinRAR can extract that file.  We have been working on this issue. Can you let us know the program that created the file?

 
answered 11/16/2017 12:41:37 AM
add a comment
0

Hi,

No I doesn't happen to all the BIN files. When I compress this file using gzip.exe it can be extracted by the component, but this file we receive from a different source, and our other applications can extract the file but this component can't.

I will send you the file.

Thank you for your help!

PS: I made some changes to the code and got the component to output something, but it did not have a file name (just said file)

 
answered 11/16/2017 12:41:37 AM
add a comment
0

Hi,

I have updated to the latest version and do not get the checksum error on most of the files (including the one I originally send to you), but there are still some of them that throw the checksum error.

I have been using ExtractAll the whole time, but for the GZIP extraction it only wrote out a file with the name "file". As a workaround for now, I get the file name from the archive filename and use Extract(ouputdir + <archivefilename without gz>). This works for most of the files (as mentioned above) but there are some of them that still throw the checksum error. I will send the file to you, can you please have a look?

This file I am sending you is a TGZ file. I get the error when using both TGZ and a combination of GZIP and TAR. When I UNGZIP the file using 7zip I am able to extrat the rest of the archive using the TAR component, but when I try the same steps using only the components I get the checksum issue

Thank you

 
answered 11/16/2017 12:41:37 AM
add a comment
0

Hi,

We are not sure what program did the compression and tar, but we are getting the file from a Solaris system if that helps.

The thing is we are able to use other tools to extract the files.

Thank you.

 
answered 11/16/2017 12:41:37 AM
add a comment

Your Answer

Not the answer you're looking for? Browse other questions tagged zip or ask your own question.