Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
f19c1b5e
Kaydet (Commit)
f19c1b5e
authored
Şub 13, 2007
tarafından
Lars Gustäbel
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Strip the '.gz' extension from the filename that is written to the
gzip header.
üst
5b1a7857
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
gzip.py
Lib/gzip.py
+6
-3
No files found.
Lib/gzip.py
Dosyayı görüntüle @
f19c1b5e
...
...
@@ -149,15 +149,18 @@ class GzipFile:
def
_write_gzip_header
(
self
):
self
.
fileobj
.
write
(
'
\037\213
'
)
# magic header
self
.
fileobj
.
write
(
'
\010
'
)
# compression method
fname
=
self
.
name
if
fname
.
endswith
(
".gz"
):
fname
=
fname
[:
-
3
]
flags
=
0
if
self
.
name
:
if
f
name
:
flags
=
FNAME
self
.
fileobj
.
write
(
chr
(
flags
))
write32u
(
self
.
fileobj
,
long
(
time
.
time
()))
self
.
fileobj
.
write
(
'
\002
'
)
self
.
fileobj
.
write
(
'
\377
'
)
if
self
.
name
:
self
.
fileobj
.
write
(
self
.
name
+
'
\000
'
)
if
f
name
:
self
.
fileobj
.
write
(
f
name
+
'
\000
'
)
def
_init_read
(
self
):
self
.
crc
=
zlib
.
crc32
(
""
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment