Example #1
0
 def unpack(self, s):
     self.bits_left = 0
     self.buffer_byte = None
     Struct.unpack(self, s)
Example #2
0
 def pack(self, s):
     with BitWriteStream(s) as bs:
         Struct.pack(self, bs)
Example #3
0
 def pack(self, s):
     fs = FakeWriteStream()
     self["content"].pack(fs)
     self["header"].data["length"] = fs.tell()
     Struct.pack(self, s)
Example #4
0
 def unpack(self, s):
     with BitReadStream(s) as bs:
         Struct.unpack(self, bs)
Example #5
0
 def unpack(self, s):
     self.bits_left = 0
     self.buffer_byte = None
     Struct.unpack(self, s)
Example #6
0
 def pack(self, s):
     fs = FakeWriteStream()
     self["content"].pack(fs)
     self["header"].data["length"] = fs.tell()
     Struct.pack(self, s)
Example #7
0
 def pack(self, s):
     with BitWriteStream(s) as bs:
         Struct.pack(self, bs)
Example #8
0
 def unpack(self, s):
     with BitReadStream(s) as bs:
         Struct.unpack(self, bs)