'Return the Block object that contains the specified
position pos, or None if it is not in the cache.'

def find_block(self, pos, _min_idx=0, _max_idx=None):

    if (_max_idx is None):
        _max_idx = (len(self.blocks) - 1)
    if (_max_idx < _min_idx):
        return None
    pivot_idx = ((_max_idx + _min_idx) / 2)
    pivot_block = self.blocks[pivot_idx]
    if (pos < pivot_block.startOffset):
        return self.find_block(pos, _min_idx, (pivot_idx - 1))
    elif (pos >= (pivot_block.startOffset + pivot_block.numBytes)):
        return self.find_block(pos, (pivot_idx + 1), _max_idx)
    else:
        return pivot_block
