boing.net.slip
— SLIP encoding¶The module boing.net.slip
provides methods and classes for
supporting the SLIP protocol encoding and decoding.
boing.net.slip.
encode
(data)¶Return a slip encoded version of data.
boing.net.slip.
decode
(data, previous=None)¶Return the list of bytearrays obtained from the slip decoding of data followed by the undecoded bytes. If previous is not None, data is appended to previous before decoding. A typical usage would be:
buffer = bytearray()
decoded, buffer = decode(data, buffer)