def nunpack(s, default=<NUM_LIT:0>):
l = len(s)<EOL>if not l:<EOL><INDENT>return default<EOL><DEDENT>elif l == <NUM_LIT:1>:<EOL><INDENT>return ord(s)<EOL><DEDENT>elif l == <NUM_LIT:2>:<EOL><INDENT>return struct.unpack('<STR_LIT>', s)[<NUM_LIT:0>]<EOL><DEDENT>elif l == <NUM_LIT:3>:<EOL><INDENT>return struct.unpack('<STR_LIT>', b'<STR_LIT:\x00>'+s)[<NUM_LIT:0>]<EOL><DEDENT>elif l == <NUM_LIT:4>:<EOL><INDENT>return struct.unpack('<STR_LIT>', s)[<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>raise TypeError('<STR_LIT>' % l)<EOL><DEDENT>
Unpacks 1 to 4 byte integers (big endian).