Optimise your openoffice files with KJar

Hi, I found a way to optimise the size of OpenOffice.org files. The OpenOffice.org file format (*.odt, *.odp, *.sxw, etc) uses series of xml files to describe the content of documents. These files are package into a JAR file (similar with zip file format) which uses deflate compression algorithm.

Though OpenOffice.org files are relatively small, it is interesting that you can make the file even smaller by recompressing the documents file using a better optimized deflate implementation.

One such implementation are made by Igor Pavlov for his 7zip application, which is used by AdvanceMAME to create a suite of application,AdvanceCOMP to recompress deflated files. However this implementation are not coded to handle the zip file variant (JAR) used by OpenOffice.org.

One alternative is to use the KJar recompressor which uses Ken Silverman deflate implementation (kzip/kunzip). The application itself is non-free and only available as Win32 binary (*.exe), however it can be adapted for use with wine.

How to compress OpenOffice.org files?

Simple, just rename your document file to .jar, and run kjar on it. The process will take a while and on average I’m able so save up to 15% -40% openoffice file size, which is about 60KB for 500KB OpenOffice file. My record is able to save 54% of the original filesize (from 1354KB to 420KB), that’s a lot of saving there.

Maybe some of you think that this is unimportant, but as for me, i’m always interested in how much space that I can squeeze on a 500+ page documents :)

Download KJar at : http://supremej2me.bambalam.se/guides/optimization-tools/kjar/

[tags]openoffice,optimization,opendocument, odf,deflate,compression[/tags]