Commit 85fa9b56 authored by Jos van den Oever's avatar Jos van den Oever

Compress ttf, svg, and rdf files in the zip container.

parent 6c527e51
......@@ -185,8 +185,13 @@ public class OdfZipNormalizer {
static private void copy(ZipFile zip, ZipEntry entry, ZipOutputStream out)
throws IOException {
InputStream in = zip.getInputStream(entry);
ZipEntry ze = new ZipEntry(entry.getName());
ze.setMethod(entry.getMethod());
final String name = entry.getName();
ZipEntry ze = new ZipEntry(name);
int method = entry.getMethod();
if (name.endsWith(".svg") || name.endsWith(".ttf") || name.endsWith(".rdf")) {
method = ZipEntry.DEFLATED;
}
ze.setMethod(method);
ze.setSize(entry.getSize());
ze.setTime(entry.getTime());
ze.setCrc(entry.getCrc());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment