Ejemplo n.º 1
0
 /// <summary>
 /// For a given number of BAT blocks, calculate how many XBAT
 /// blocks will be needed
 /// </summary>
 /// <param name="blockCount">number of BAT blocks</param>
 /// <returns>number of XBAT blocks needed</returns>
 public static int CalculateXBATStorageRequirements(int blockCount)
 {
     return((blockCount > HeaderBlockConstants._max_bats_in_header)
            ? BATBlock.CalculateXBATStorageRequirements(blockCount
                                                        - HeaderBlockConstants._max_bats_in_header)
            : 0);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// For a given number of BAT blocks, calculate how many XBAT
 /// blocks will be needed
 /// </summary>
 /// <param name="bigBlockSize"></param>
 /// <param name="blockCount">number of BAT blocks</param>
 /// <returns>number of XBAT blocks needed</returns>
 public static int CalculateXBATStorageRequirements(POIFSBigBlockSize bigBlockSize, int blockCount)
 {
     return((blockCount > _max_bats_in_header)
         ? BATBlock.CalculateXBATStorageRequirements(bigBlockSize, blockCount - _max_bats_in_header) : 0);
 }