Commit 48949cd2 authored by Alex Willmer's avatar Alex Willmer Committed by David Wilson

parent: Use 'zip' alias of 'zlib' decoder

SSH command size: 448 (-5 bytes)
Preamble size: 8941 (no change)

NB: The 'zip' alias was absent in Python 3.x, until Python 3.4. This
should change be reverted if Python 3.0, 3.2, or 3.3 support is
required.
parent 0f82f68f
......@@ -340,7 +340,7 @@ class Stream(mitogen.core.Stream):
os.environ['ARGV0']=e=sys.executable
os.execv(e,['mitogen:CONTEXT_NAME'])
os.write(1,'EC0\n')
C=_(sys.stdin.read(PREAMBLE_COMPRESSED_LEN), 'zlib')
C=_(sys.stdin.read(PREAMBLE_COMPRESSED_LEN), 'zip')
os.fdopen(W,'w',0).write(C)
os.fdopen(w,'w',0).write('PREAMBLE_LEN\n'+C)
os.write(1,'EC1\n')
......@@ -362,7 +362,7 @@ class Stream(mitogen.core.Stream):
return [
self.python_path, '-c',
'import codecs;_=codecs.decode;'
'exec(_(_("%s".encode(),"base64"),"zlib"))' % (encoded,)
'exec(_(_("%s".encode(),"base64"),"zip"))' % (encoded,)
]
def get_preamble(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment