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
1dc3a501
Kaydet (Commit)
1dc3a501
authored
Nis 05, 1999
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Made improvements based on changes just made and comments from
Bernhard Reiter <bernhard@csd.uwm.edu>.
üst
fa1591c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
libgzip.tex
Doc/lib/libgzip.tex
+11
-6
No files found.
Doc/lib/libgzip.tex
Dosyayı görüntüle @
1dc3a501
...
...
@@ -11,7 +11,10 @@ with that used by the GNU compression program \program{gzip}.
Accordingly, the
\module
{
gzip
}
module provides the
\class
{
GzipFile
}
class to read and write
\program
{
gzip
}
-format files, automatically
compressing or decompressing the data so it looks like an ordinary
file object.
file object. Note that additional file formats which can be
decompressed by the
\program
{
gzip
}
and
\program
{
gunzip
}
programs, such
as those produced by
\program
{
compress
}
and
\program
{
pack
}
, are not
supported by this module.
The module defines the following items:
...
...
@@ -34,10 +37,12 @@ to the filename of \var{fileobj}, if discernible; otherwise, it
defaults to the empty string, and in this case the original filename
is not included in the header.
The
\var
{
mode
}
argument can be either
\code
{
'r'
}
or
\code
{
'w'
}
,
depending on whether the file will be read or written. The default is
the mode of
\var
{
fileobj
}
if discernible; otherwise, the default is
\code
{
'r'
}
.
The
\var
{
mode
}
argument can be any of
\code
{
'r'
}
,
\code
{
'rb'
}
,
\code
{
'a'
}
,
\code
{
'ab'
}
,
\code
{
'w'
}
, or
\code
{
'wb'
}
, depending on
whether the file will be read or written. The default is the mode of
\var
{
fileobj
}
if discernible; otherwise, the default is
\code
{
'rb'
}
.
Be aware that only the
\code
{
'rb'
}
,
\code
{
'ab'
}
, and
\code
{
'wb'
}
values should be used for cross-platform portability.
The
\var
{
compresslevel
}
argument is an integer from
\code
{
1
}
to
\code
{
9
}
controlling the level of compression;
\code
{
1
}
is fastest and
...
...
@@ -55,7 +60,7 @@ object's \method{getvalue()} method.
\begin{funcdesc}
{
open
}{
filename
\optional
{
, mode
\optional
{
, compresslevel
}}}
This is a shorthand for
\code
{
GzipFile(
\var
{
filename
}
,
}
\code
{
\var
{
mode
}
,
}
\code
{
\var
{
compresslevel
}
)
}
. The
\var
{
filename
}
argument is required;
\var
{
mode
}
defaults to
\code
{
'r'
}
and
argument is required;
\var
{
mode
}
defaults to
\code
{
'r
b
'
}
and
\var
{
compresslevel
}
defaults to
\code
{
9
}
.
\end{funcdesc}
...
...
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