mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-11-02 18:40:55 +00:00
Merge pull request #31 from seliopou/master
Fix Unpacker example in README
This commit is contained in:
commit
1e17642264
1 changed files with 3 additions and 2 deletions
|
|
@ -54,10 +54,11 @@ stream.
|
||||||
|
|
||||||
unpacker = msgpack.Unpacker()
|
unpacker = msgpack.Unpacker()
|
||||||
while True:
|
while True:
|
||||||
data = buf.read(4)
|
data = buf.read(16)
|
||||||
if not data:
|
if not data:
|
||||||
break
|
break
|
||||||
unpacker.seed(buf.read(16))
|
unpacker.feed(data)
|
||||||
|
|
||||||
for unpacked in unpacker:
|
for unpacked in unpacker:
|
||||||
print unpacked
|
print unpacked
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue