def _eoltype(data):
    """Guess the EOL type of a file"""
    if b'\x00' in data:
        return None
    if b'\r\n' in data:
        return b'\r\n'
    if b'\r' in data:
        return b'\r'
    if b'\n' in data:
        return b'\n'
    return None
