Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I decompress .iwa files format? #267

Open
egorbarkovsky opened this issue Nov 14, 2020 · 3 comments
Open

How can I decompress .iwa files format? #267

egorbarkovsky opened this issue Nov 14, 2020 · 3 comments

Comments

@egorbarkovsky
Copy link

Hey, I'm trying to work with iWork 13' Format, and for my aim I have to decompress .iwa files using java. But when I tried to do this using you library, got this:
Exception in thread "main" java.io.IOException: FAILED_TO_UNCOMPRESS(5) at org.xerial.snappy.SnappyNative.throw_error(SnappyNative.java:112) at org.xerial.snappy.SnappyNative.rawUncompress(Native Method) at org.xerial.snappy.Snappy.rawUncompress(Snappy.java:478) at org.xerial.snappy.Snappy.uncompress(Snappy.java:517) at org.xerial.snappy.Snappy.uncompress(Snappy.java:492) at Client.main(Client.java:25)

How can I prove that?

@egorbarkovsky
Copy link
Author

@xerial

@bokken
Copy link
Contributor

bokken commented Nov 14, 2020

As I read this description of iwa format, it is loosely the snappy framing format, but does not include required portions of the format.

If it actually adhered to the spec, you could use https://github.com/xerial/snappy-java/blob/master/src/main/java/org/xerial/snappy/SnappyFramedInputStream.java. Based on that doc, however, it seems that will not work. You could use the SnappyFramedInputStream source as a starting point to process the custom framing format of iwa files.

@egorbarkovsky
Copy link
Author

Thank you for your answer! However, may be you know how can we add this "required Stream Identifier chunk" to the iwa file format buffer?

As I read this description of iwa format, it is loosely the snappy framing format, but does not include required portions of the format.

If it actually adhered to the spec, you could use https://github.com/xerial/snappy-java/blob/master/src/main/java/org/xerial/snappy/SnappyFramedInputStream.java. Based on that doc, however, it seems that will not work. You could use the SnappyFramedInputStream source as a starting point to process the custom framing format of iwa files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants