Decompress Error

ZLib Technical Support

Decompress Error

Postby Dumdidum on Thu Dec 17, 2009 8:42 pm

Hello

i am getting an error while decompressing bytes. I am compressing them (reading them from a FileStream) and afterwards I am decompressing them using Utils.Decompress.
Its working most of the time, but with some parts, its not.

I get an error "inflating: "

Error seems to happen here:

n = (int) ((q <= WindowWrite ? WindowWrite : WindowEnd) - q);

WindowWrite = 7663
WindowEnd = 32768
q = 7663

So n = 0 and r = -5, this gives the error BufferError while Inflating...

Any hints?

Thanks
Dumdidum
 
Posts: 4
Joined: Sat Sep 26, 2009 9:13 am

Re: Decompress Error

Postby Cellbi on Tue Dec 22, 2009 10:13 pm

Do you have any sample reproducing this problem?
Thanks,
Tech Support
Cellbi Software
Cellbi
Support
 
Posts: 70
Joined: Sat Mar 15, 2008 8:41 am
Location: Cellbi Software

Re: Decompress Error

Postby Dumdidum on Thu Jan 07, 2010 3:37 pm

Hi

Here is a test-project with the part of the file which gets the error (original file is a outlook backup pst-file)
The file is 10000 bytes long.

http://dl.dropbox.com/u/3784027/ErrorZlib.zip

Actually I downloaded this Code from your site:
http://www.cellbi.com/Download.aspx?id=Cellbi.ZLib.zip

Installed it and copied the files of the folder Cellbi Products\Cellbi.ZLib-1.0.0.10\Src\Cellbi.ZLib
to my project, then I had to fix 2 things to make it silverlight compatible (Silverlight 3)

Array.Copy(buffer, 0, result, 0, output.Length);
to:
Array.Copy(buffer, 0, result, 0, Convert.ToInt32(output.Length));

You can see the problem when you just run the project, press on the button, then select the "archivbackup.error"-file.
It will then read all 10000 bytes, compress it successfully and then while decompressing it failes.

It is really just failing with some strange constellation of bytes. I could compress and decompress lots of files without any problem.

Can you reproduce the error?

Thanks
Dumdidum
 
Posts: 4
Joined: Sat Sep 26, 2009 9:13 am

Re: Decompress Error

Postby Dumdidum on Thu Jan 07, 2010 4:51 pm

Me again.

I've now converted another DotNetZlib-Project to Silverlight and it's working. Will be using that.

Btw. the error is also happening while using Desktop .NET Framework, not Silverlight.
Dumdidum
 
Posts: 4
Joined: Sat Sep 26, 2009 9:13 am


Return to ZLib

Who is online

Users browsing this forum: No registered users and 1 guest

cron