code: def packto(self, namedstruct, stream):
          
          # Default implementation
          data = self.pack(namedstruct)
          return stream.write(data)
docs: Pack a struct to a stream
          
          :param namedstruct: struct to pack
          
          :param stream: a buffered stream
          
          :return: appended bytes size