def _get_blocks_by_filename(file_name, block_map):
        fp = open(file_name, 'rb')
        buf = fp.read()
        blocks = [buf[offset: offset + size] for offset, size in block_map]
        fp.close()
        return blocks