def parse_m3_u8(data):
    """ Returns an iterator of the segment names enumerated in 'index.m3u8' """

    # Convert file bytes into a string without newline padding
    # Ignore the comments (marked by a '#' at the start of a line)
    return (
        filter(
            lambda text: ".ts" in text,
            (
                line.decode("utf-8").rstrip()
                for line in data
                if chr(line[0]) != '#'
            )
        )
    )