From 097d6ccf7da44013c6d28fea7dce23708b77a044 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Wed, 5 Nov 2014 10:07:05 -0800 Subject: [PATCH] Use a bitfield to make the index 2/3 the size, to save some disk churn --- tile.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tile.h b/tile.h index 5b1ff79..0612765 100644 --- a/tile.h +++ b/tile.h @@ -18,9 +18,9 @@ struct pool_val *deserialize_string(char **f, struct pool *p, int type); struct index { - unsigned long long index; - long long fpos; - int maxzoom; + unsigned long long index; + long long fpos : 56; + int maxzoom : 8; }; long long write_tile(struct index *start, struct index *end, char *metabase, unsigned *file_bbox, int z, unsigned x, unsigned y, int detail, int basezoom, struct pool *file_keys, char *layername, sqlite3 *outdb, double droprate, int buffer);