'Initialize the BufferedPktLineWriter.
:param write: A write callback for the underlying writer.
:param bufsize: The internal buffer size, including length prefixes.'

def __init__(self, write, bufsize=65515):

    self._write = write
    self._bufsize = bufsize
    self._wbuf = BytesIO()
    self._buflen = 0
