All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.tukaani.xz.index.BlockInfo Maven / Gradle / Ivy

/*
 * BlockInfo
 *
 * Author: Lasse Collin 
 *
 * 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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy