java-libpst icon indicating copy to clipboard operation
java-libpst copied to clipboard

Unable to decompress sub folders

Open toherrmann opened this issue 8 years ago • 8 comments

Running example.Test with an Outlook 2016.ost produces following error:

Can't get children for folder Posteingang(8578) child count: 7 - com.pff.PSTException: Unable to decompress reportedly compressed block, using alternate child tree with 7 items

After reactivation of try/ catch in PSTNodeInputStream.java:136 it says:

java.util.zip.ZipException: incorrect header check


3a00 e435 2000 0000 0000 443f 2000 0100 ..ä5......D..... 0000 2441 2000 0200 0000 84bd 2000 0300 ...A............ 0000 a4fb 2000 0400 0000 c4fb 2000 0500 ...û......Äû.... 0000 e4fb 2000 0600 0000 5800 5700 0200 ..äû......X.W... 0200 0200 0200 0200 0200 0200 0200 0200 ................ 0200 0200 0200 0200 0200 0200 0200 0200 ................ 0200 0200 0200 0200 0200 0200 0200 0200 ................ 0200 0200 0200 0200 0200 0200 0200 0200 ................ 0200 0200 0200 0200 0200 0200 0200 0200 ................ 0200 0200 0200 0200 0200 0200 0200 0200 ................ 0200 0200 0200 0200 0200 0200 0200 0200 ................ 0200 0200 0200 0200 0200 0200 0200 0200 ................ 0200 0200 0200 0200 0200 0200 0200 0200 ................ 0200 0200 0200 0200 0200 0200 0200 0200 ................ 0200 0200 0200 0200 0200 0200 0200 3a00 ................`

Also changing inflater code for this special case to final InflaterOutputStream inflaterStream = new InflaterOutputStream(outputStream, new Inflater(nowrap)); and giving it a "dummy" byte (described in Inflater JavaDoc) was'nt successful.

toherrmann avatar Jun 09 '17 14:06 toherrmann

interesting, is this an OST you can provide?

rjohnsondev avatar Jun 09 '17 23:06 rjohnsondev

No, I can't provide the file. It's the email account of a friend. And the file has a size of 230 MB. sry

toherrmann avatar Jun 10 '17 05:06 toherrmann

I found a spec from MS. They write about "RTF compression" there. Could it be, that such a compression algorithm is used for the problematic node? MS-PST-File-Specification.pdf

toherrmann avatar Jun 10 '17 08:06 toherrmann

nah, MS started compressing some of the file blocks with zlib in the 2013 file format, the error is indicating the library is attempting to decompress non-compressed data. This may be because the data was incorrectly assumed to be compressed, or that the wrong data was accessed. The block that you included looks like it may be a series of pointers to a composite block that may be compressed and have the actual data in it. Unfortunately the zlib compression piece is not documented so the only real way to work out (AFIK so far) is to find example PST files that demonstrate the behaviour and reverse engineer.

As an aside, the folder child records seem to be pretty fragile, and it might be worth trying SCANPST against the file to see if that makes a difference (obviously make a copy first), just in case it's a corruption issue.

rjohnsondev avatar Jun 10 '17 09:06 rjohnsondev

I already tried to repair the file by SCANPST. The file size increased from 250322944 to 267001856. After that in second run SCANPST meant, that there are unimportant inconsistenies in the file, which don't need to be repaired.

toherrmann avatar Jun 10 '17 10:06 toherrmann

I asked my friend to give you access to the .ost file. He agreed but only to share with you (no other people). How can we do this?

toherrmann avatar Jun 10 '17 10:06 toherrmann

You could upload it to something like dropbox and email me a link: libpst AT rjohnson.id.au

rjohnsondev avatar Jun 10 '17 10:06 rjohnsondev

You should have received the share link. This is the original (corrupted) version of that OST file.

toherrmann avatar Jun 10 '17 12:06 toherrmann