def from_bitstream(cls, bitstream): offset = bitstream.tell() // 8 recordheader = RecordHeader.from_bitstream(bitstream) bits = bitstream.read(BitStream[recordheader.length * 8]) inst = cls.parse_inner(bits) inst.length = recordheader.length inst.offset = offset return inst
def from_bitstream(cls, bitstream): offset = bitstream.tell() // 8 recordheader = RecordHeader.from_bitstream(bitstream) bits = bitstream.read(BitStream[recordheader.length*8]) inst = cls.parse_inner(bits) inst.length = recordheader.length inst.offset = offset return inst
def next_tag_header(self): if not self._next_tag_header: self._next_tag_header = RecordHeader.from_bitstream(self.bitstream) return self._next_tag_header