GIF89a;
' print ' The file will be compressed or decompressed.' sys.exit(0) filename = sys.argv[1] if filename.endswith('.gz'): compressing = False outputname = filename[:-3] else: compressing = True outputname = filename + '.gz' input = open(filename, 'rb') output = open(outputname, 'wb') if compressing: compress(filename, input, output) else: decompress(input, output) input.close() output.close() if __name__ == '__main__': main()