Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git] / llvm / test / tools / llvm-objcopy / Inputs / ungzip.py
blob7824e9ababb3ca2fe22e069cfc3808e47d6a47c3
1 import gzip
2 import sys
4 with gzip.open(sys.argv[1], "rb") as f:
5 writer = getattr(sys.stdout, "buffer", None)
6 if writer is None:
7 writer = sys.stdout
8 if sys.platform == "win32":
9 import os, msvcrt
11 msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
13 writer.write(f.read())
14 sys.stdout.flush()