Read the map compressed.
authornotzed@gmail.com <notzed@gmail.com@b8b59bfb-1aa4-4687-8f88-a62eeb14c21e>
Fri, 1 Nov 2013 01:06:58 +0000 (01:06 +0000)
committernotzed@gmail.com <notzed@gmail.com@b8b59bfb-1aa4-4687-8f88-a62eeb14c21e>
Fri, 1 Nov 2013 01:06:58 +0000 (01:06 +0000)
git-svn-id: file:///home/notzed/svn/duskz/trunk@21 b8b59bfb-1aa4-4687-8f88-a62eeb14c21e

DuskServer/src/duskz/server/entityz/TileMap.java

index ac23ed7..7f55cdb 100644 (file)
@@ -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<TileMap.MapData> {
        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();