@Override
    public void replaceInterval(byte[] newFile, int start)
    {
        validateInterval(start, start + newFile.length);

        if (comp == CompressionType.None)
            parentFile.replaceInterval(newFile, start);
        else
        {
            byte[] data = parentFile.getContents();
            if (comp == CompressionType.Lz)
                data = LZ.decompress(data);
            else if (comp == CompressionType.LzWithHeader)
                data = LZ.decompressHeadered(data);
            else
                throw new UnsupportedOperationException("Bad LZFile Type: " + comp);

            System.arraycopy(newFile, 0, data, start, newFile.length);

            if (comp == CompressionType.Lz)
                parentFile.replace(LZ.compress(data), this);
            else if (comp == CompressionType.LzWithHeader)
                parentFile.replace(LZ.compressHeadered(data), this);
        }
    }