FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python/pythonchallenge/21.py at master · bjd1111/python · GitHub
bjd1111
python
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python
/
pythonchallenge
/
21.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
23 lines (21 loc) · 518 Bytes
Breadcrumbs
python
/
pythonchallenge
/
21.py
Copy path
File metadata and controls
23 lines (21 loc) · 518 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import
bz2
import
zlib
f
=
open
(
'20/package.pack'
,
'r'
)
data
=
f
.
read
()
#print data
def
unwrap
(
data
):
result
=
""
while
True
:
if
data
.
startswith
(
'x
\x9c
'
):
data
=
zlib
.
decompress
(
data
)
result
+=
' '
elif
data
.
startswith
(
'BZh'
):
data
=
bz2
.
decompress
(
data
)
result
+=
'#'
elif
data
.
endswith
(
'
\x9c
x'
):
data
=
data
[::
-
1
]
result
+=
'
\n
'
else
:
return
result
print
unwrap
(
data
)
f
.
close
()
Back
|
FazBrowse Home
|
New Git URL