<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_string(self, s):
 """ Add a string to the stream. @param s: string to add @type s: str """

        self.add_int(len(s))
        self.packet.write(s)
        return self