public synchronized DataInputStream getChunkDataInputStream(int var1, int var2) {
      if(this.outOfBounds(var1, var2)) {
         this.debugln("READ", var1, var2, "out of bounds");
         return null;
      } else {
         try {
            int var3 = this.getOffset(var1, var2);
            if(var3 == 0) {
               return null;
            } else {
               int var4 = var3 >> 8;
               int var5 = var3 & 255;
               if(var4 + var5 > this.sectorFree.size()) {
                  this.debugln("READ", var1, var2, "invalid sector");
                  return null;
               } else {
                  this.dataFile.seek((long)(var4 * 4096));
                  int var6 = this.dataFile.readInt();
                  if(var6 > 4096 * var5) {
                     this.debugln("READ", var1, var2, "invalid length: " + var6 + " > 4096 * " + var5);
                     return null;
                  } else {
                     byte var7 = this.dataFile.readByte();
                     byte[] var8;
                     DataInputStream var9;
                     if(var7 == 1) {
                        var8 = new byte[var6 - 1];
                        this.dataFile.read(var8);
                        var9 = new DataInputStream(new GZIPInputStream(new ByteArrayInputStream(var8)));
                        return var9;
                     } else if(var7 == 2) {
                        var8 = new byte[var6 - 1];
                        this.dataFile.read(var8);
                        var9 = new DataInputStream(new InflaterInputStream(new ByteArrayInputStream(var8)));
                        return var9;
                     } else {
                        this.debugln("READ", var1, var2, "unknown version " + var7);
                        return null;
                     }
                  }
               }
            }
         } catch (IOException var10) {
            this.debugln("READ", var1, var2, "exception");
            return null;
         }
      }
   }