decode()
Function¶
-
dlestxetx.
decode
(packet: bytes) → bytes¶ Unwrap data from a DLE/STX/ETX packet.
Parameters: packet – the packet to decode. Returns: the data within the supplied packet. Raises: ValueError – if the input doesn’t represent a valid packet, or if extraneous bytes follow that packet.