public static ChmBlockInfo getChmBlockInfoInstance(DirectoryListingEntry dle, int bytesPerBlock,
                                                       ChmLzxcControlData clcd,
                                                       ChmBlockInfo chmBlockInfo)
            throws ChmParsingException {
        if (chmBlockInfo == null) {
            chmBlockInfo = new ChmBlockInfo();
        }
        if (!validateParameters(dle, bytesPerBlock, clcd, chmBlockInfo)) {
            throw new ChmParsingException("Please check you parameters");
        }


        chmBlockInfo.setStartBlock(dle.getOffset() / bytesPerBlock);
        chmBlockInfo.setEndBlock((dle.getOffset() + dle.getLength()) / bytesPerBlock);
        chmBlockInfo.setStartOffset(dle.getOffset() % bytesPerBlock);
        chmBlockInfo.setEndOffset((dle.getOffset() + dle.getLength()) % bytesPerBlock);
        // potential problem with casting long to int
        chmBlockInfo.setIniBlock(
                chmBlockInfo.startBlock - chmBlockInfo.startBlock % (int) clcd.getResetInterval());
//                (getChmBlockInfo().startBlock - getChmBlockInfo().startBlock)
//                        % (int) clcd.getResetInterval());
        return chmBlockInfo;
    }
A container that contains chm block information such as: i. initial block is
using to reset main tree ii. start block is using for knowing where to start
iii. end block is using for knowing where to stop iv. start offset is using
for knowing where to start reading v. end offset is using for knowing where
to stop reading
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/chm/ChmBlockInfo.java