Class: Zlib::GzipFile
- Inherits:
-
Object
- Object
- Zlib::GzipFile
- Defined in:
- ext/rubysl/zlib/zlib.c,
ext/rubysl/zlib/zlib.c
Overview
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.
Direct Known Subclasses
Defined Under Namespace
Classes: CRCError, Error, LengthError, NoFooter
Class Method Summary collapse
-
.wrap ⇒ Object
See Zlib::GzipReader#wrap and Zlib::GzipWriter#wrap.
Instance Method Summary collapse
-
#close ⇒ Object
Closes the GzipFile object.
-
#closed? ⇒ Boolean
Same as IO.
-
#comment ⇒ Object
Returns comments recorded in the gzip file header, or nil if the comments is not present.
-
#crc ⇒ Object
Returns CRC value of the uncompressed data.
-
#finish ⇒ Object
Closes the GzipFile object.
-
#level ⇒ Object
Returns compression level.
-
#mtime ⇒ Object
Returns last modification time recorded in the gzip file header.
-
#orig_name ⇒ Object
Returns original filename recorded in the gzip file header, or
nilif original filename is not present. -
#os_code ⇒ Object
Returns OS code number recorded in the gzip file header.
-
#sync ⇒ Object
Same as IO.
-
#sync=(flag) ⇒ Object
Same as IO.
-
#to_io ⇒ Object
Same as IO.
Class Method Details
.wrap ⇒ Object
See Zlib::GzipReader#wrap and Zlib::GzipWriter#wrap.
2345 2346 2347 |
# File 'ext/rubysl/zlib/zlib.c', line 2345 static VALUE rb_gzfile_s_wrap(argc, argv, klass) int argc; |
Instance Method Details
#close ⇒ Object
Closes the GzipFile object. This method calls close method of the associated IO object. Returns the associated IO object.
2562 2563 2564 |
# File 'ext/rubysl/zlib/zlib.c', line 2562 static VALUE rb_gzfile_close(obj) VALUE obj; |
#closed? ⇒ Boolean
Same as IO.
2594 2595 2596 |
# File 'ext/rubysl/zlib/zlib.c', line 2594 static VALUE rb_gzfile_closed_p(obj) VALUE obj; |
#comment ⇒ Object
Returns comments recorded in the gzip file header, or nil if the comments is not present.
2454 2455 2456 |
# File 'ext/rubysl/zlib/zlib.c', line 2454 static VALUE rb_gzfile_comment(obj) VALUE obj; |
#crc ⇒ Object
Returns CRC value of the uncompressed data.
2397 2398 2399 |
# File 'ext/rubysl/zlib/zlib.c', line 2397 static VALUE rb_gzfile_crc(obj) VALUE obj; |
#finish ⇒ Object
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.
2579 2580 2581 |
# File 'ext/rubysl/zlib/zlib.c', line 2579 static VALUE rb_gzfile_finish(obj) VALUE obj; |
#level ⇒ Object
Returns compression level.
2417 2418 2419 |
# File 'ext/rubysl/zlib/zlib.c', line 2417 static VALUE rb_gzfile_level(obj) VALUE obj; |
#mtime ⇒ Object
Returns last modification time recorded in the gzip file header.
2407 2408 2409 |
# File 'ext/rubysl/zlib/zlib.c', line 2407 static VALUE rb_gzfile_mtime(obj) VALUE obj; |
#orig_name ⇒ Object
Returns original filename recorded in the gzip file header, or nil if original filename is not present.
2438 2439 2440 |
# File 'ext/rubysl/zlib/zlib.c', line 2438 static VALUE rb_gzfile_orig_name(obj) VALUE obj; |
#os_code ⇒ Object
Returns OS code number recorded in the gzip file header.
2427 2428 2429 |
# File 'ext/rubysl/zlib/zlib.c', line 2427 static VALUE rb_gzfile_os_code(obj) VALUE obj; |
#sync ⇒ Object
Same as IO.
2617 2618 2619 |
# File 'ext/rubysl/zlib/zlib.c', line 2617 static VALUE rb_gzfile_sync(obj) VALUE obj; |
#sync=(flag) ⇒ Object
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.
2631 2632 2633 |
# File 'ext/rubysl/zlib/zlib.c', line 2631 static VALUE rb_gzfile_set_sync(obj, mode) VALUE obj, mode; |
#to_io ⇒ Object
Same as IO.
2387 2388 2389 |
# File 'ext/rubysl/zlib/zlib.c', line 2387 static VALUE rb_gzfile_to_io(obj) VALUE obj; |