Class Zlib::GzipFile
In: ext/zlib/zlib.c
Parent: Object

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.

Methods

close   closed?   comment   crc   finish   level   mtime   orig_name   os_code   sync   sync=   to_io   wrap  

Classes and Modules

Class Zlib::GzipFile::CRCError
Class Zlib::GzipFile::Error
Class Zlib::GzipFile::LengthError
Class Zlib::GzipFile::NoFooter

Public Class methods

See Zlib::GzipReader#wrap and Zlib::GzipWriter#wrap.

Public Instance methods

Closes the GzipFile object. This method calls close method of the associated IO object. Returns the associated IO object.

Same as IO.

Returns comments recorded in the gzip file header, or nil if the comments is not present.

Returns CRC value of the uncompressed data.

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.

Returns compression level.

Returns last modification time recorded in the gzip file header.

Returns original filename recorded in the gzip file header, or nil if original filename is not present.

Returns OS code number recorded in the gzip file header.

Same as IO.

Same as IO. If flag is true, the associated IO object must respond to the flush method. While sync mode is true, the compression ratio decreases sharply.

Same as IO.

[Validate]

ruby-doc.org is a service of James Britt and Neurogami, a Ruby application development company in Phoenix, AZ.

Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.

For more information on the Ruby programming language, visit ruby-lang.org.

Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.