You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Tim Allison (JIRA)" <ji...@apache.org> on 2016/06/09 12:50:21 UTC

[jira] [Comment Edited] (COMPRESS-352) Add snappy decompressor that handles Apple .iwa files

    [ https://issues.apache.org/jira/browse/COMPRESS-352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15322434#comment-15322434 ] 

Tim Allison edited comment on COMPRESS-352 at 6/9/16 12:49 PM:
---------------------------------------------------------------

So sorry for delay!

I still haven't made time to figure out protobufs.  Argh...

I found another implementation of this "dialect" -- [iwana|https://github.com/evernote/iwana/blob/master/iwana-extract/src/main/java/com/evernote/iwana/SnappyNoCRCFramedInputStream.java].

I compared its output to the output with commons, and they are identical.

So, I think a unit test with your current output is good enough for now.

Something like:
{code}
        byte[] uncompressed = IOUtils.toByteArray(new FileInputStream(new File(dir, "snappyIWATest.raw")));
        assertEquals(6931, uncompressed.length);
        assertEquals(0x23, uncompressed[0]);
        assertEquals(0x08, uncompressed[1]);
        assertEquals(0x01, uncompressed[2]);
{code}

Thank you, again!!!


was (Author: tallison@mitre.org):
So sorry for delay!

I still haven't made time to figure out protobufs.  Argh...

I found another implementation of this "dialect" -- [iwana|https://github.com/evernote/iwana/blob/master/iwana-extract/src/main/java/com/evernote/iwana/SnappyNoCRCFramedInputStream.java].

I compared its output to the output with commons, and they are identical.

So, I think a unit test with your current output is good enough for now.

{code}
        byte[] uncompressed = IOUtils.toByteArray(new FileInputStream(new File(dir, "snappyIWATest.raw")));
        assertTrue(new String(uncompressed, "US-ASCII").contains("Custom Format"));
{code}

Thank you, again!!!

> Add snappy decompressor that handles Apple .iwa files
> -----------------------------------------------------
>
>                 Key: COMPRESS-352
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-352
>             Project: Commons Compress
>          Issue Type: New Feature
>            Reporter: Tim Allison
>
> On TIKA-1966, one of our users recently shared the newest iOS iWorks files.  They've gotten rid of internal .zip and now rely exclusively on .iwa files.  commons-compress doesn't currently appear to handle these (snappy-compressed?) files...probably because:
> bq. However, the variant of Snappy that is used does not comply with the spec for that format, omitting the stream identifier and checksum.
> from  http://fileformats.archiveteam.org/wiki/IWA
> Any chance you'd be able to modify the snappy decompression to handle Apple's variant?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)