From 8589c7662d8223af14933b98f2a4f31e00d94c86 Mon Sep 17 00:00:00 2001 From: "notzed@gmail.com" Date: Fri, 1 Nov 2013 01:06:58 +0000 Subject: [PATCH] Read the map compressed. git-svn-id: file:///home/notzed/svn/duskz/trunk@21 b8b59bfb-1aa4-4687-8f88-a62eeb14c21e --- DuskServer/src/duskz/server/entityz/TileMap.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); -- 2.39.5