equal
deleted
inserted
replaced
481 self.islast = last |
481 self.islast = last |
482 |
482 |
483 return self |
483 return self |
484 |
484 |
485 |
485 |
486 class sansiodecoder(object): |
486 class sansiodecoder: |
487 """A CBOR decoder that doesn't perform its own I/O. |
487 """A CBOR decoder that doesn't perform its own I/O. |
488 |
488 |
489 To use, construct an instance and feed it segments containing |
489 To use, construct an instance and feed it segments containing |
490 CBOR-encoded bytes via ``decode()``. The return value from ``decode()`` |
490 CBOR-encoded bytes via ``decode()``. The return value from ``decode()`` |
491 indicates whether a fully-decoded value is available, how many bytes |
491 indicates whether a fully-decoded value is available, how many bytes |
974 l = list(self._decodedvalues) |
974 l = list(self._decodedvalues) |
975 self._decodedvalues = [] |
975 self._decodedvalues = [] |
976 return l |
976 return l |
977 |
977 |
978 |
978 |
979 class bufferingdecoder(object): |
979 class bufferingdecoder: |
980 """A CBOR decoder that buffers undecoded input. |
980 """A CBOR decoder that buffers undecoded input. |
981 |
981 |
982 This is a glorified wrapper around ``sansiodecoder`` that adds a buffering |
982 This is a glorified wrapper around ``sansiodecoder`` that adds a buffering |
983 layer. All input that isn't consumed by ``sansiodecoder`` will be buffered |
983 layer. All input that isn't consumed by ``sansiodecoder`` will be buffered |
984 and concatenated with any new input that arrives later. |
984 and concatenated with any new input that arrives later. |