View Single Post
Onag Onag's Avatar

JCF Member

Joined: Feb 2002

Posts: 165

Onag is doing well so far

Aug 15, 2006, 08:21 PM
Onag is offline
Reply With Quote
You can ban me for resurrecting this, but...

Has anyone actually tried decompressing any of the files using these file formats? Every time I try to do it with a .j2t, I run into a problem with the Data1 block. Specifically, When I inflate/decompress the block of 4153 bytes, I fill up the 27652 bytes it's supposed to be with 4 bytes still remaining in the compressed block.

For example:

CData1 = 4153
UData1 = 27652

So, I allocate an array of 4153 bytes and copy the CData1 block into it. I then use a zlib library (a managed/.NET one called ICSharpCode.SharpZipLib) to inflate/decompress that data into another array of 27652 bytes.

The 27652 byte array is filled up with uncompressed data, but there are still 4 bytes remaining in CData1 that have not yet been touched.

The header seems to be right, and all of the other blocks work fine, but I can't figure out what is going on with those 4 bytes.

Anyway, I'm wondering if anyone else has been able to get this working. If so, I'll know the problem is either in my code, or in the way the zlib library is working.

-Nag
__________________
http://www.inocompany.com/