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
2cc0b07a
Kaydet (Commit)
2cc0b07a
authored
Kas 09, 2012
tarafından
Chris Withers
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Bug #16441: avoid excessive memory usage working with large gzip files
üst
dc118790
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
gzip.py
Lib/gzip.py
+2
-2
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/gzip.py
Dosyayı görüntüle @
2cc0b07a
...
@@ -421,7 +421,7 @@ class GzipFile(io.BufferedIOBase):
...
@@ -421,7 +421,7 @@ class GzipFile(io.BufferedIOBase):
if
offset
<
self
.
offset
:
if
offset
<
self
.
offset
:
raise
IOError
(
'Negative seek in write mode'
)
raise
IOError
(
'Negative seek in write mode'
)
count
=
offset
-
self
.
offset
count
=
offset
-
self
.
offset
for
i
in
range
(
count
//
1024
):
for
i
in
x
range
(
count
//
1024
):
self
.
write
(
1024
*
'
\0
'
)
self
.
write
(
1024
*
'
\0
'
)
self
.
write
((
count
%
1024
)
*
'
\0
'
)
self
.
write
((
count
%
1024
)
*
'
\0
'
)
elif
self
.
mode
==
READ
:
elif
self
.
mode
==
READ
:
...
@@ -429,7 +429,7 @@ class GzipFile(io.BufferedIOBase):
...
@@ -429,7 +429,7 @@ class GzipFile(io.BufferedIOBase):
# for negative seek, rewind and do positive seek
# for negative seek, rewind and do positive seek
self
.
rewind
()
self
.
rewind
()
count
=
offset
-
self
.
offset
count
=
offset
-
self
.
offset
for
i
in
range
(
count
//
1024
):
for
i
in
x
range
(
count
//
1024
):
self
.
read
(
1024
)
self
.
read
(
1024
)
self
.
read
(
count
%
1024
)
self
.
read
(
count
%
1024
)
...
...
Misc/NEWS
Dosyayı görüntüle @
2cc0b07a
...
@@ -464,6 +464,9 @@ Library
...
@@ -464,6 +464,9 @@ Library
-
Issue
#
6884
:
Fix
long
-
standing
bugs
with
MANIFEST
.
in
parsing
in
distutils
-
Issue
#
6884
:
Fix
long
-
standing
bugs
with
MANIFEST
.
in
parsing
in
distutils
on
Windows
.
on
Windows
.
-
Issue
#
16441
:
Avoid
excessive
memory
usage
working
with
large
gzip
files
using
the
gzip
module
.
Extension
Modules
Extension
Modules
-----------------
-----------------
...
...
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