def decode(self, packet):
self.encoded = packet<EOL>lenLen = <NUM_LIT:1><EOL>while packet[lenLen] & <NUM_LIT>:<EOL><INDENT>lenLen += <NUM_LIT:1><EOL><DEDENT>packet_remaining = packet[lenLen+<NUM_LIT:1>:]<EOL>self.msgId   = decode16Int(packet_remaining[<NUM_LIT:0>:<NUM_LIT:2>])<EOL>self.topics = []<EOL>packet_remaining = packet_remaining[<NUM_LIT:2>:]<EOL>while len(packet_remaining):<EOL><INDENT>l = decode16Int(packet_remaining[<NUM_LIT:0>:<NUM_LIT:2>])<EOL>topic = packet_remaining[<NUM_LIT:2>:<NUM_LIT:2>+l].decode(encoding='<STR_LIT:utf-8>')<EOL>self.topics.append(topic)<EOL>packet_remaining = packet_remaining[<NUM_LIT:2>+l:]<EOL><DEDENT>
Decode a UNSUBACK control packet.