def analyse(file, length=None):
if isinstance(file, bytes):<EOL><INDENT>file = io.BytesIO(file)<EOL><DEDENT>io_check(file)<EOL>int_check(length or sys.maxsize)<EOL>return analyse2(file, length)<EOL>
Analyse application layer packets.

    Keyword arguments:
        * file -- bytes or file-like object, packet to be analysed
        * length -- int, length of the analysing packet

    Returns:
        * Analysis -- an Analysis object from `pcapkit.analyser`