Lines Matching full:pack

31     All provide a pack() and unpack().  The pack() function
33 function apack() that returns a list of struct.pack() bytes,
34 and pack() just joins them up as needed.
36 The pack/unpack functions take a dictionary of variable names
88 def pack(self, vdict, cdict, val): member in EncDec
111 compat hack. The output of e.pack is <type 'bytes'>; b2s
117 >>> e.b2s(e.pack({}, {}, 0))
119 >>> e.b2s(e.pack({}, {}, 256))
124 >>> e.pack({}, {}, None)
128 >>> e.pack({}, {}, -1)
159 >>> e.b2s(e.pack({}, {}, 'p3=unicode,p2=bytes'))
162 >>> e.b2s(e.pack({}, {}, b'bytes'))
169 >>> [b2i(x) for x in e.pack({}, {}, u'\u1234')]
177 >>> e.pack({}, {}, 16384 * 'spam')
222 return [self.struct.pack(val)]
227 return [EncDecSimple.string_len.pack(len(sval)), sval]
229 # pack name=None and self.s2b() tries to use .encode on it.
282 We also require a Sequencer to pack and unpack the members of
301 >>> e.b2s(e.pack({}, {}, qid_inst))
347 Pack each of our instance variables.
373 Note that we don't pack or unpack the repeat count itself --
379 >>> e.b2s(e.pack({'nwname': 2}, {}, ['A', 'BC']))
399 makes the repeated item pack or unpack a simple byte
404 >>> e.b2s(e.pack({'count': 5}, {}, b'12345'))
431 "pack each val[i], for i in range(vdict[self.repeat])"
474 pack/unpack.
484 (returns a list of parts) and a plain pack(). Users should
485 mostly stick with plain pack().
495 >>> e.b2s(s.pack({'eggs': 513, 'spam': 65}, {}))
511 >>> e.b2s(s.pack({'eggs': 513, 'spam': 65}, {'.u': True}))
513 >>> e.b2s(s.pack({'eggs': 513, 'spam': 65}, {'.u': False}))
547 >>> ae.b2s(s.pack({'n': 2, 'array': [257, 514]}, {}))
604 # Pack the item.
605 self.dprint('pack %r - no cond or %r is True' % (code, cond))
610 def pack(self, vdict, cdict): member in Sequencer