def deflate_long(n, add_sign_padding=True):
<EOL>s = '<STR_LIT>'<EOL>n = int(n)<EOL>while (n != <NUM_LIT:0>) and (n != -<NUM_LIT:1>):<EOL><INDENT>s = struct.pack('<STR_LIT>', n & <NUM_LIT>) + s<EOL>n = n >> <NUM_LIT:32><EOL><DEDENT>for i in enumerate(s):<EOL><INDENT>if (n == <NUM_LIT:0>) and (i[<NUM_LIT:1>] != '<STR_LIT>'):<EOL><INDENT>break<EOL><DEDENT>if (n == -<NUM_LIT:1>) and (i[<NUM_LIT:1>] != '<STR_LIT>'):<EOL><INDENT>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>i = (<NUM_LIT:0>,)<EOL>if n == <NUM_LIT:0>:<EOL><INDENT>s = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>s = '<STR_LIT>'<EOL><DEDENT><DEDENT>s = s[i[<NUM_LIT:0>]:]<EOL>if add_sign_padding:<EOL><INDENT>if (n == <NUM_LIT:0>) and (ord(s[<NUM_LIT:0>]) >= <NUM_LIT>):<EOL><INDENT>s = '<STR_LIT:\x00>' + s<EOL><DEDENT>if (n == -<NUM_LIT:1>) and (ord(s[<NUM_LIT:0>]) < <NUM_LIT>):<EOL><INDENT>s = '<STR_LIT>' + s<EOL><DEDENT><DEDENT>return s<EOL>
turns a long-int into a normalized byte string (adapted from Crypto.Util.number)