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)<EOL>self.granted = [ (byte & <NUM_LIT>, byte & <NUM_LIT> == <NUM_LIT>) <EOL>for byte in packet_remaining[<NUM_LIT:2>:] ]<EOL>
Decode a SUBACK control packet.