From 8b800e4798c08a3d75a78a818fc8678fd2aeb5c4 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sat, 18 Aug 2018 14:17:41 +0100 Subject: [PATCH] add --dump to preamble_size.py. --- preamble_size.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/preamble_size.py b/preamble_size.py index 66d5ccf3..bf3b5950 100644 --- a/preamble_size.py +++ b/preamble_size.py @@ -4,6 +4,7 @@ contexts. """ import inspect +import sys import zlib import mitogen.fakessh @@ -24,6 +25,10 @@ print('Preamble size: %s (%.2fKiB)' % ( len(stream.get_preamble()), len(stream.get_preamble()) / 1024.0, )) +if '--dump' in sys.argv: + print(zlib.decompress(stream.get_preamble())) + exit() + print( ' '