diff options
author | Naoki INADA <inada-n@eagle> | 2009-07-12 20:02:21 +0900 |
---|---|---|
committer | Naoki INADA <inada-n@eagle> | 2009-07-12 20:02:21 +0900 |
commit | 2d885ad22afa24c5fbf62b5cf0d5970f4a4a2ff7 (patch) | |
tree | 0d82c9dd369e7a3dbb6c622408a39276778a5598 /msgpack/_msgpack.pyx | |
parent | e963ad55d27ae0f39bec605f3a0f0362061c9655 (diff) | |
download | msgpack-python-2d885ad22afa24c5fbf62b5cf0d5970f4a4a2ff7.tar.gz |
Release 0.1.0
Diffstat (limited to 'msgpack/_msgpack.pyx')
-rw-r--r-- | msgpack/_msgpack.pyx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/msgpack/_msgpack.pyx b/msgpack/_msgpack.pyx index b407b92..7990a18 100644 --- a/msgpack/_msgpack.pyx +++ b/msgpack/_msgpack.pyx @@ -139,7 +139,7 @@ cdef class Packer(object): def pack(object o, object stream): - """pack a object `o` and write it to stream).""" + """pack an object `o` and write it to stream).""" packer = Packer() stream.write(packer.pack(o)) @@ -164,7 +164,7 @@ cdef extern from "unpack.h": def unpackb(object packed_bytes): - """Unpack packed_bytes to object. Returns unpacked object.""" + """Unpack packed_bytes to object. Returns an unpacked object.""" cdef const_char_ptr p = packed_bytes cdef template_context ctx cdef size_t off = 0 @@ -179,7 +179,7 @@ def unpackb(object packed_bytes): unpacks = unpackb def unpack(object stream): - """unpack from stream.""" + """unpack an object from stream.""" packed = stream.read() return unpackb(packed) @@ -196,14 +196,14 @@ cdef class UnpackIterator(object): return self cdef class Unpacker(object): - """Unpacker(file_like=None, read_size=4096) + """Unpacker(file_like=None, read_size=1024*1024) Streaming unpacker. file_like must have read(n) method. read_size is used like file_like.read(read_size) - If file_like is None, you can feed() bytes. feed() is useful - for unpack from non-blocking stream. + If file_like is None, you can ``feed()`` bytes. ``feed()`` is + useful for unpacking from non-blocking stream. exsample 1: unpacker = Unpacker(afile) |