summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWildemann Stefan <stefan.wildemann@corpuls.com>2019-08-06 10:23:20 +0200
committerWildemann Stefan <stefan.wildemann@corpuls.com>2019-08-06 10:23:20 +0200
commitd4f73645a62d9f93cb5ae123fe2cf44c9922df41 (patch)
tree81f97b58fad84d7f1acd9ac29dd246c2f9c0239d
parent95d1a69425d3d6d616e7402c58fb6d2869a1a16d (diff)
downloadnavit-d4f73645a62d9f93cb5ae123fe2cf44c9922df41.tar.gz
Make 64 bit zip default.
This is baraindead. Lost days of computing time because getting invalid zip files at the end because of being too big. Make 64 bit zips the default. Neccessary for big maps anyway, and shouldn't hurt on small files.
-rw-r--r--navit/maptool/maptool.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/navit/maptool/maptool.c b/navit/maptool/maptool.c
index 12aa50eda..e89726a0b 100644
--- a/navit/maptool/maptool.c
+++ b/navit/maptool/maptool.c
@@ -279,7 +279,8 @@ static void usage(void) {
fprintf(f,"maptool --protobuf -i planet.osm.pbf planet.bin\n");
fprintf(f,"Available switches:\n");
fprintf(f,"-h (--help) : this screen\n");
- fprintf(f,"-6 (--64bit) : set zip 64 bit compression\n");
+ fprintf(f,"-3 (--32bit) : set zip 32 bit compression\n");
+ fprintf(f,"-6 (--64bit) : set zip 64 bit compression (default)\n");
fprintf(f,"-a (--attr-debug-level) <level> : control which data is included in the debug attribute\n");
fprintf(f,"-c (--dump-coordinates) : dump coordinates after phase 1\n");
#ifdef HAVE_POSTGRESQL
@@ -358,6 +359,7 @@ static int parse_option(struct maptool_params *p, char **argv, int argc, int *op
int pos,c,i;
static struct option long_options[] = {
+ {"32bit", 0, 0, '3'},
{"64bit", 0, 0, '6'},
{"attr-debug-level", 1, 0, 'a'},
{"binfile", 0, 0, 'b'},
@@ -398,6 +400,9 @@ static int parse_option(struct maptool_params *p, char **argv, int argc, int *op
if (c == -1)
return 1;
switch (c) {
+ case '3':
+ p->zip64=0;
+ break;
case '6':
p->zip64=1;
break;
@@ -923,6 +928,7 @@ int main(int argc, char **argv) {
linguistics_init();
memset(&p, 0, sizeof(p));
+ p.zip64=1; /* default to 64 bit zip */
#ifdef HAVE_ZLIB
p.compression_level=9;
#endif