diff options
author | Tim Peters <tim.peters@gmail.com> | 2004-07-18 06:16:08 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2004-07-18 06:16:08 (GMT) |
commit | 182b5aca27d376b08a2904bed42b751496f932f3 (patch) | |
tree | df13115820dbc879c0fe2eae488c9f8c0215a7da /Demo/zlib/zlibdemo.py | |
parent | e6ddc8b20b493fef2e7cffb2e1351fe1d238857e (diff) | |
download | cpython-182b5aca27d376b08a2904bed42b751496f932f3.zip cpython-182b5aca27d376b08a2904bed42b751496f932f3.tar.gz cpython-182b5aca27d376b08a2904bed42b751496f932f3.tar.bz2 |
Whitespace normalization, via reindent.py.
Diffstat (limited to 'Demo/zlib/zlibdemo.py')
-rwxr-xr-x | Demo/zlib/zlibdemo.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Demo/zlib/zlibdemo.py b/Demo/zlib/zlibdemo.py index 7c56e3e..5a0ab63 100755 --- a/Demo/zlib/zlibdemo.py +++ b/Demo/zlib/zlibdemo.py @@ -4,7 +4,7 @@ import zlib, sys if len(sys.argv)>1: filename=sys.argv[1] else: filename='zlibdemo.py' print 'Reading', filename -f=open(filename, 'r') # Get the data to compress +f=open(filename, 'r') # Get the data to compress s=f.read() f.close() @@ -24,7 +24,7 @@ decompressor=zlib.decompressobj() comptext=decomp='' for i in range(0, len(s), chunk): comptext=comptext+compressor.compress(s[i:i+chunk]) -comptext=comptext+compressor.flush() # Don't forget to call flush()!! +comptext=comptext+compressor.flush() # Don't forget to call flush()!! for i in range(0, len(comptext), chunk): decomp=decomp+decompressor.decompress(comptext[i:i+chunk]) @@ -33,4 +33,3 @@ decomp=decomp+decompressor.flush() print 'Progressive compression (level 9):' print ' Original:', len(s), 'Compressed:', len(comptext), print 'Uncompressed:', len(decomp) - |