blob: babae7f7833e7b4c193be0fba1a591ed55111cce [file] [log] [blame]
/*
* BlockInfo
*
* Author: Lasse Collin <lasse.collin@tukaani.org>
*
* This file has been put into the public domain.
* You can do whatever you want with this file.
*/
package org.tukaani.xz.index;
import org.tukaani.xz.common.StreamFlags;
public class BlockInfo {
public int blockNumber = -1;
public long compressedOffset = -1;
public long uncompressedOffset = -1;
public long unpaddedSize = -1;
public long uncompressedSize = -1;
IndexDecoder index;
public BlockInfo(IndexDecoder indexOfFirstStream) {
index = indexOfFirstStream;
}
public int getCheckType() {
return index.getStreamFlags().checkType;
}
public boolean hasNext() {
return index.hasRecord(blockNumber + 1);
}
public void setNext() {
index.setBlockInfo(this, blockNumber + 1);
}
}