public synchronized DataInputStream getChunkDataInputStream(int par1, int par2)
    {
        if (outOfBounds(par1, par2))
        {
            return null;
        }

        try
        {
            int i = getOffset(par1, par2);

            if (i == 0)
            {
                return null;
            }

            int j = i >> 8;
            int k = i & 0xff;

            if (j + k > sectorFree.size())
            {
                return null;
            }

            dataFile.seek(j * 4096);
            int l = dataFile.readInt();

            if (l > 4096 * k)
            {
                return null;
            }

            if (l <= 0)
            {
                return null;
            }

            byte byte0 = dataFile.readByte();

            if (byte0 == 1)
            {
                byte abyte0[] = new byte[l - 1];
                dataFile.read(abyte0);
                return new DataInputStream(new BufferedInputStream(new GZIPInputStream(new ByteArrayInputStream(abyte0))));
            }

            if (byte0 == 2)
            {
                byte abyte1[] = new byte[l - 1];
                dataFile.read(abyte1);
                return new DataInputStream(new BufferedInputStream(new InflaterInputStream(new ByteArrayInputStream(abyte1))));
            }
            else
            {
                return null;
            }
        }
        catch (IOException ioexception)
        {
            return null;
        }
    }