def dumps(self, script):
        "Return a compressed representation of script as a binary string."
        string = BytesIO()
        self._dump(script, string, self._protocol, self._version)
        return string.getvalue()
Return a compressed representation of script as a binary string.