public static BATBlockAndIndex GetSBATBlockAndIndex(int offset, HeaderBlock header, List <BATBlock> sbats) { POIFSBigBlockSize bigBlockSize = header.BigBlockSize; int whichSBAT = (int)Math.Floor(1.0 * offset / bigBlockSize.GetBATEntriesPerBlock()); int index = offset % bigBlockSize.GetBATEntriesPerBlock(); return(new BATBlockAndIndex(index, sbats[whichSBAT])); }
public HeaderBlockWriter(HeaderBlock headerBlock) { _header_block = headerBlock; }
public HeaderBlockWriter(POIFSBigBlockSize bigBlockSize) { _header_block = new HeaderBlock(bigBlockSize); }
public static long CalculateMaximumSize(HeaderBlock header) { return(CalculateMaximumSize(header.BigBlockSize, header.BATCount)); }