def pos_to_block(pos, len)
      start_block, start_byte = pos.divmod(@sb.block_size)
      end_block, _end_byte = (pos + len - 1).divmod(@sb.block_size)
      nblocks = end_block - start_block + 1
      return start_block, start_byte, nblocks
    end
def pos_to_block(pos, len)
      start_block, start_byte = pos.divmod(@sb.block_size)
      end_block, _end_byte = (pos + len - 1).divmod(@sb.block_size)
      nblocks = end_block - start_block + 1
      return start_block, start_byte, nblocks
    end
NB: pos is 0-based, while len is 1-based