'Generates overlapping blocks of data read from a file.'

def _StreamFile(self, fd, offset, length):

    to_read = length
    fd.seek(offset)
    overlap = fd.read(min(self.OVERLAP_SIZE, to_read))
    to_read -= len(overlap)
    (yield overlap)
    while (to_read > 0):
        data = fd.read(min(self.CHUNK_SIZE, to_read))
        if (not data):
            return
        to_read -= len(data)
        combined_data = (overlap + data)
        (yield combined_data)
        overlap = combined_data[(- self.OVERLAP_SIZE):]
