def add_adaptive_int(self, n):
if n >= Message.big_int:<EOL><INDENT>self.packet.write(max_byte)<EOL>self.add_string(util.deflate_long(n))<EOL><DEDENT>else:<EOL><INDENT>self.packet.write(struct.pack("<STR_LIT>", n))<EOL><DEDENT>return self<EOL>
Add an integer to the stream.

:param int n: integer to add