def map_file_blocks(fpath):
    headers = []
    block_times = []
    data_start_bytes = []
    with open(fpath, 'rb') as f:
        h = raw_parsing.read_first_header(f)
        headers.append(h)
        time = raw_parsing.parse_time(h)
        block_times.append(time)
        data_start_bytes.append(f.tell())
        block_size = h['nSizeOfDataBlock']
        while True:
            f.seek(block_size, 1)
            try:
                h = raw_parsing.read_basic_header(f)
            except EOFError:
                break
            time = raw_parsing.parse_time(h)
            if (time == 0):
                break
            headers.append(h)
            block_times.append(time)
            data_start_bytes.append(f.tell())
    headers = np.asarray(headers)
    block_times = np.asarray(block_times)
    data_start_bytes = np.asarray(data_start_bytes)
    return (headers, block_times, data_start_bytes)
def map_file_blocks(fpath):
    headers = []
    block_times = []
    data_start_bytes = []
    with open(fpath, 'rb') as f:
        h = raw_parsing.read_first_header(f)
        headers.append(h)
        time = raw_parsing.parse_time(h)
        block_times.append(time)
        data_start_bytes.append(f.tell())
        block_size = h['nSizeOfDataBlock']
        while True:
            f.seek(block_size, 1)
            try:
                h = raw_parsing.read_basic_header(f)
            except EOFError:
                break
            time = raw_parsing.parse_time(h)
            if (time == 0):
                break
            headers.append(h)
            block_times.append(time)
            data_start_bytes.append(f.tell())
    headers = np.asarray(headers)
    block_times = np.asarray(block_times)
    data_start_bytes = np.asarray(data_start_bytes)
    return (headers, block_times, data_start_bytes)