From: notzed@gmail.com Date: Fri, 1 Nov 2013 01:06:58 +0000 (+0000) Subject: Read the map compressed. X-Git-Tag: dusk-0.1~1 X-Git-Url: https://code.zedzone.au/cvs?a=commitdiff_plain;h=8589c7662d8223af14933b98f2a4f31e00d94c86;p=duskz Read the map compressed. git-svn-id: file:///home/notzed/svn/duskz/trunk@21 b8b59bfb-1aa4-4687-8f88-a62eeb14c21e --- diff --git a/DuskServer/src/duskz/server/entityz/TileMap.java b/DuskServer/src/duskz/server/entityz/TileMap.java index ac23ed7..7f55cdb 100644 --- a/DuskServer/src/duskz/server/entityz/TileMap.java +++ b/DuskServer/src/duskz/server/entityz/TileMap.java @@ -38,6 +38,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Objects; import java.util.PriorityQueue; +import java.util.zip.GZIPInputStream; /** * Low level map management and helpers. @@ -214,7 +215,7 @@ public class TileMap implements Iterable { public static TileMap loadLayered(File path) throws IOException { TileMap map; - try (DataInputStream mapFile = new DataInputStream(new FileInputStream(path))) { + try (DataInputStream mapFile = new DataInputStream(new GZIPInputStream(new FileInputStream(path)))) { int magic = mapFile.readInt(); int version = mapFile.readInt(); int flags = mapFile.readInt();