From 09a8cdfaf799e30be5cba6fe8e109b49fbeac20b Mon Sep 17 00:00:00 2001 From: Pavol Zibrita Date: Mon, 26 Sep 2011 00:55:46 +0200 Subject: [PATCH] Include original file size in zipfile. --- .../src/net/osmand/data/index/IndexBatchCreator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DataExtractionOSM/src/net/osmand/data/index/IndexBatchCreator.java b/DataExtractionOSM/src/net/osmand/data/index/IndexBatchCreator.java index 05386a7b60..9a0a764e70 100644 --- a/DataExtractionOSM/src/net/osmand/data/index/IndexBatchCreator.java +++ b/DataExtractionOSM/src/net/osmand/data/index/IndexBatchCreator.java @@ -629,7 +629,9 @@ public class IndexBatchCreator { try { ZipOutputStream zout = new ZipOutputStream(new FileOutputStream(zFile)); zout.setLevel(9); - zout.putNextEntry(new ZipEntry(fileName)); + ZipEntry zEntry = new ZipEntry(fileName); + zEntry.setSize(f.length()); + zout.putNextEntry(zEntry); FileInputStream is = new FileInputStream(f); byte[] BUFFER = new byte[8192]; int read = 0;