repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git]
/
llvm
/
test
/
tools
/
llvm-objcopy
/
Inputs
/
ungzip.py
blob
7824e9ababb3ca2fe22e069cfc3808e47d6a47c3
1
import
gzip
2
import
sys
3
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
10
11
msvcrt
.
setmode
(
sys
.
stdout
.
fileno
(),
os
.
O_BINARY
)
12
13
writer
.
write
(
f
.
read
())
14
sys
.
stdout
.
flush
()