class Zlib::GzipFile
Zlib::GzipFile is an abstract class for handling a gzip formatted compressed file. The operations are defined in the subclasses, Zlib::GzipReader for reading, and Zlib::GzipWriter for writing.
GzipReader should be used by associating an IO, or IO-like, object.
Method Catalogue
-
comment= (
Zlib::GzipWriter#comment=) -
eof? (
Zlib::GzipReader#eof?) -
lineno (
Zlib::GzipReader#lineno) -
lineno= (
Zlib::GzipReader#lineno=) -
mtime= (
Zlib::GzipWriter#mtime=) -
path (when the underlying
IOsupports #path)
(due to internal structure, documentation may appear under Zlib::GzipReader or Zlib::GzipWriter)
Public Class Methods
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/zlib/0/gzip_file.rbs, line 51
def self.wrap: (IO io, *untyped) { (instance gz) -> void } -> void
Creates a GzipReader or GzipWriter associated with io, passing in any necessary extra options, and executes the block with the newly created object just like File.open.
The GzipFile object will be closed automatically after executing the block. If you want to keep the associated IO object open, you may call Zlib::GzipFile#finish method in the block.
Public Instance Methods
() → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/zlib/0/gzip_file.rbs, line 60
def close: () -> void
() → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/zlib/0/gzip_file.rbs, line 68
def closed?: () -> void
Same as IO#closed?
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/zlib/0/gzip_file.rbs, line 77
def comment: () -> String?
Returns comments recorded in the gzip file header, or nil if the comments is not present.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/zlib/0/gzip_file.rbs, line 85
def crc: () -> Integer
Returns CRC value of the uncompressed data.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/zlib/0/gzip_file.rbs, line 95
def finish: () -> IO
Closes the GzipFile object. Unlike Zlib::GzipFile#close, this method never calls the close method of the associated IO object. Returns the associated IO object.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/zlib/0/gzip_file.rbs, line 103
def level: () -> Integer
Returns compression level.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/zlib/0/gzip_file.rbs, line 111
def mtime: () -> Time
Returns last modification time recorded in the gzip file header.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/zlib/0/gzip_file.rbs, line 120
def orig_name: () -> String?
Returns original filename recorded in the gzip file header, or nil if original filename is not present.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/zlib/0/gzip_file.rbs, line 128
def os_code: () -> Integer
Returns OS code number recorded in the gzip file header.
() → bool
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/zlib/0/gzip_file.rbs, line 136
def sync: () -> bool
Same as IO#sync
(boolish) → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/zlib/0/gzip_file.rbs, line 146
def sync=: (boolish) -> untyped