5 # Copyright (C) UENO Katsuhiro 2000-2003
7 # $Id: zlib.rd 11708 2007-02-12 23:01:19Z shyouhei $
10 = Ruby/zlib version 0.6.0
12 Ruby/zlib is an extension library to use zlib from Ruby.
13 Ruby/zlib also provides the features for accessing gzipped files.
15 You can modify or redistribute Ruby/zlib in the same manner of
16 Ruby interpreter. The latest version of Ruby/zlib would be found
17 at ((<URL:http://www.blue.sky.or.jp/>)).
19 Any comments and suggestions are always welcome. Please send
20 them to ruby-list ML, ruby-ext ML, ruby-talk ML, or the author's
21 mail address ((<URL:mailto:katsu@blue.sky.or.jp>)).
23 This document is experimental and broken English version.
24 If you find some mistakes or strange expressions (including
25 kidding or unnatural ones) in this document, please let me know
34 * ((<Zlib::GzipFile>))
35 * ((<Zlib::GzipFile::Error>))
36 * ((<Zlib::GzipWriter>))
37 * ((<Zlib::GzipReader>))
39 * ((<Changes from 0.5 to 0.6>))
40 * ((<Changes from 0.4 to 0.5>))
44 Zlib is the module which provides the other features in zlib C
45 library. See zlib.h for detail of each module function.
51 Returns the string which represents the version of zlib
54 --- Zlib.adler32([string[, adler]])
56 Calculates Alder-32 checksum for ((|string|)),
57 and returns updated value of ((|alder|)).
58 If ((|string|)) is omitted, it returns the Adler-32 initial
59 value. If ((|alder|)) is omitted, it assumes that the initial
60 value is given to ((|alder|)).
62 --- Zlib.crc32([string[, crc]])
64 Calculates CRC checksum for ((|string|)), and returns
65 updated value of ((|crc|)). If ((|string|)) is omitted,
66 it returns the CRC initial value. ((|crc|)) is omitted,
67 it assumes that the initial value is given to ((|crc|)).
71 Returns the table for calculating CRC checksum as an array.
77 The Ruby/zlib version string.
79 --- Zlib::ZLIB_VERSION
81 The string which represents the version of zlib.h.
87 The integers representing data types which
88 ((<Zlib::ZStream#data_type>)) method returns.
90 --- Zlib::NO_COMPRESSION
92 --- Zlib::BEST_COMPRESSION
93 --- Zlib::DEFAULT_COMPRESSION
95 The integers representing compression levels which are
96 an argument for ((<Zlib::Deflate.new>)),
97 ((<Zlib::Deflate#deflate>)), and so on.
100 --- Zlib::HUFFMAN_ONLY
101 --- Zlib::DEFAULT_STRATEGY
103 The integers representing compression methods which are
104 an argument for ((<Zlib::Deflate.new>)) and
105 ((<Zlib::Deflate#params>)).
107 --- Zlib::DEF_MEM_LEVEL
108 --- Zlib::MAX_MEM_LEVEL
110 The integers representing memory levels which are an
111 argument for ((<Zlib::Deflate.new>)),
112 ((<Zlib::Deflate#params>)), and so on.
116 The default value of ((|windowBits|)) which is an argument for
117 ((<Zlib::Deflate.new>)) and ((<Zlib::Inflate.new>)).
124 The integers to control the output of the deflate stream,
125 which are an argument for ((<Zlib::Deflate#deflate>)) and so on.
144 The return values of ((<Zlib::GzipFile#os_code>)) method.
149 The superclass for all exceptions raised by Ruby/zlib.
151 The following exceptions are defined as subclasses of Zlib::Error.
152 These exceptions are raised when zlib library functions return
153 with an error status.
170 The abstract class for the stream which handles the compressed
171 data. The operations are defined in the subclasses,
172 ((<Zlib::Deflate>)) for compression, and ((<Zlib::Inflate>))
175 An instance of Zlib::ZStream has one stream (struct zstream) and
176 two variable-length buffers which associated to the input
177 (next_in) of the stream and the output (next_out) of the stream.
178 In this document, "input buffer" means the buffer for input, and
179 "output buffer" means the buffer for output.
181 Data inputed into an instance of Zlib::ZStream are temporally
182 stored into the end of input buffer, and then data in input buffer
183 are processed from the beginning of the buffer until no more
184 output from the stream is produced (i.e. until avail_out > 0
185 after processing). During processing, output buffer is allocated
186 and expanded automatically to hold all output data.
188 Some particular instance methods consume the data in output buffer
189 and return them as a String.
191 Here is an ascii art for describing above:
193 +================ an instance of Zlib::ZStream ================+
195 || +--------+ +-------+ +--------+ ||
196 || +--| output |<---------|zstream|<---------| input |<--+ ||
197 || | | buffer | next_out+-------+next_in | buffer | | ||
198 || | +--------+ +--------+ | ||
200 +===|======================================================|===+
203 "output data" "input data"
205 If an error is occurred during processing input buffer,
206 an exception which is a subclass of ((<Zlib::Error>)) is raised.
207 At that time, both input and output buffer keeps their conditions
208 at the time when the error is occurred.
216 --- Zlib::ZStream.new
218 See ((<Zlib::Deflate.new>)) and ((<Zlib::Inflate.new>)).
222 --- Zlib::ZStream#avail_in
224 Returns bytes of data in input buffer.
227 --- Zlib::ZStream#avail_out
229 Returns bytes of free spaces in output buffer.
230 Because the free spaces are allocated automatically,
231 this method returns 0 normally.
233 --- Zlib::ZStream#avail_out = size
235 Allocates free spaces of ((|size|)) bytes in output buffer.
236 If there are more than ((|size|)) bytes spaces in the buffer,
237 the buffer is truncated.
238 Because the free spaces are allocated automatically,
239 you usually need not to use this method.
241 --- Zlib::ZStream#flush_next_in
243 Flushes input buffer and returns all data in that buffer.
245 --- Zlib::ZStream#flush_next_out
247 Flushes output buffer and returns all data in that buffer.
249 --- Zlib::ZStream#total_in
251 Returns the total bytes of the input data to the stream.
253 --- Zlib::ZStream#total_out
255 Returns the total bytes of the output data from the stream.
257 --- Zlib::ZStream#data_type
259 Guesses the type of the data which have been inputed into
260 the stream. The returned value is either ((<Zlib::BINARY>)),
261 ((<Zlib::ASCII>)), or ((<Zlib::UNKNOWN>)).
263 --- Zlib::ZStream#adler
265 Returns the alder-32 checksum.
267 --- Zlib::ZStream#reset
269 Resets and initializes the stream. All data in both
270 input and output buffer are discarded.
272 --- Zlib::ZStream#finish
274 Finishes the stream and flushes output buffer.
275 See ((<Zlib::Deflate#finish>)) and ((<Zlib::Inflate#finish>))
276 for detail of the behavior.
278 --- Zlib::ZStream#finished?
279 --- Zlib::ZStream#stream_end?
281 Returns true if the stream is finished.
283 --- Zlib::ZStream#close
284 --- Zlib::ZStream#end
286 Closes the stream. All operations on the closed stream
287 will raise an exception.
289 --- Zlib::ZStream#closed?
290 --- Zlib::ZStream#ended?
292 Returns true if the stream closed.
297 The class for compressing string data.
301 * ((<Zlib::ZStream>))
305 --- Zlib::Deflate.deflate(string[, level])
307 Compresses ((|string|)). The avail values of ((|level|)) are
308 ((<Zlib::NO_COMPRESSION>)), ((<Zlib::BEST_SPEED>)),
309 ((<Zlib::BEST_COMPRESSION>)), ((<Zlib::DEFAULT_COMPRESSION>)),
310 and the integer from 0 to 9.
312 This method is almost equivalent to the following code:
314 def deflate(string, level)
315 z = Zlib::Deflate.new(level)
316 dst = z.deflate(string, Zlib::FINISH)
321 --- Zlib::Deflate.new([level[, windowBits[, memlevel[, strategy]]]])
323 Creates a new deflate stream for compression.
324 See zlib.h for details of each argument.
325 If an argument is nil, the default value of that
330 --- Zlib::Deflate#clone
332 Duplicates the deflate stream.
334 --- Zlib::Deflate#deflate(string[, flush])
336 Inputs ((|string|)) into the deflate stream and returns
337 the output from the stream. Calling this method,
338 both input and output buffer of the stream are flushed.
339 If ((|string|)) is nil, this method finishes the stream,
340 just like ((<Zlib::ZStream#finish>)).
341 The value of ((|flush|)) should be either ((<Zlib::NO_FLUSH>)),
342 ((<Zlib::SYNC_FLUSH>)), ((<Zlib::FULL_FLUSH>)), or
344 See zlib.h for details.
346 --- Zlib::Deflate#<< string
348 Inputs ((|string|)) into the deflate stream just like
349 ((<Zlib::Deflate#deflate>)), but returns Zlib::Deflate object
350 itself. The output from the stream is preserved in output
353 --- Zlib::Deflate#flush([flush])
355 This method is equivalent to (({deflate('', ((|flush|)))})).
356 If ((|flush|)) is omitted, ((<Zlib::SYNC_FLUSH>)) is used
357 as ((|flush|)). This method is just provided for
358 readability of your Ruby script.
360 --- Zlib::Deflate#finish
362 Finishes the stream. This method is equivalent to
363 (({deflate('', Zlib::FINISH)})).
365 --- Zlib::Deflate#params(level, strategy)
367 Changes the parameters of the deflate stream.
368 See zlib.h for details. The output from the stream
369 by changing the params is preserved in output buffer.
371 --- Zlib::Deflate#set_dictionary(string)
373 Sets the preset dictionary and returns ((|string|)).
374 This method is available just only after
375 ((<Zlib::Deflate.new>)) or ((<Zlib::ZStream#reset>)) method
376 was called. See zlib.h for details.
381 The class for decompressing compressed data.
382 Unlike ((<Zlib::Deflate>)), an instance of this class is not able
383 to duplicate (clone, dup) itself.
387 * ((<Zlib::ZStream>))
391 --- Zlib::Inflate.inflate(string)
393 Decompresses ((|string|)). Raises a ((<Zlib::NeedDict>))
394 exception if a preset dictionary is needed for decompression.
396 This method is almost equivalent to the following code:
399 zstream = Zlib::Inflate.new
400 buf = zstream.inflate(string)
406 --- Zlib::Inflate.new([windowBits])
408 Creates a new inflate stream for decompression.
409 See zlib.h for details of the argument.
410 If ((|windowBits|)) is nil, the default value is used.
414 --- Zlib::Inflate#inflate(string)
416 Inputs ((|string|)) into the inflate stream and returns
417 the output from the stream. Calling this method,
418 both input and output buffer of the stream are flushed.
419 If ((|string|)) is nil, this method finishes the stream,
420 just like ((<Zlib::ZStream#finish>)).
422 Raises a ((<Zlib::NeedDict>)) exception if a preset
423 dictionary is needed to decompress. Set the dictionary
424 by ((<Zlib::Inflate#set_dictionary>)) and then call
425 this method again with an empty string.
427 --- Zlib::Inflate#<< string
429 Inputs ((|string|)) into the inflate stream just like
430 ((<Zlib::Inflate#inflate>)), but returns Zlib::Inflate object
431 itself. The output from the stream is preserved in output
434 --- Zlib::Inflate#finish
436 Finishes the inflate stream and returns the garbage
437 following the compressed data. Raises an exception
438 if the stream is not finished
439 (i.e. ((<Zlib::ZStream#finished?>)) doesn't returns true).
441 The inflate stream finishes itself as soon as it meets
442 the end code of the compressed data, you need not to call
443 this method explicitly. However, this method is useful
444 for checking whether the data is correctly ended or not.
446 --- Zlib::Inflate#set_dictionary(string)
448 Sets the preset dictionary and returns ((|string|))
449 This method is available just only after a ((<Zlib::NeedDict>))
450 exception was raised. See zlib.h for details.
452 --- Zlib::Inflate#sync(string)
454 Inputs ((|string|)) into the end of input buffer and
455 skips data until a full flush point can be found.
456 If the point is found in the buffer, this method flushes
457 the buffer and returns false. Otherwise it returns true
458 and the following data of full flush point is preserved
461 --- Zlib::Inflate#sync_point?
468 The abstract class for handling a gzip formatted compressed file.
469 The operations are defined in the subclasses,
470 ((<Zlib::GzipReader>)) for reading, and ((<Zlib::GzipWriter>))
473 GzipReader should be used with associating an instance of IO class
474 (or an object which has the same methods as IO has).
482 --- Zlib::GzipFile.new(args...)
484 See ((<Zlib::GzipReader.new>)) and ((<Zlib::GzipWriter.new>)).
486 --- Zlib::GzipFile.wrap(args...) {|gz| ... }
488 See ((<Zlib::GzipReader.wrap>)) and ((<Zlib::GzipWriter.wrap>)).
490 --- Zlib::GzipFile.open(args...) {|gz| ... }
492 See ((<Zlib::GzipReader.open>)) and ((<Zlib::GzipWriter.open>)).
496 --- Zlib::GzipFile#closed?
497 --- Zlib::GzipFile#to_io
501 --- Zlib::GzipFile#close
503 Closes the GzipFile object. This method calls close method
504 of the associated IO object. Returns the associated IO object.
506 --- Zlib::GzipFile#finish
508 Closes the GzipFile object. Unlike ((<Zlib::GzipFile#close>)),
509 this method ((*never*)) calls close method of the associated IO
510 object. Returns the associated IO object.
512 --- Zlib::GzipFile#crc
514 Returns CRC value of the uncompressed data.
516 --- Zlib::GzipFile#level
518 Returns compression level.
520 --- Zlib::GzipFile#mtime
522 Returns last modification time recorded in the gzip
525 --- Zlib::GzipFile#os_code
527 Returns OS code number recorded in the gzip file header.
529 --- Zlib::GzipFile#orig_name
531 Returns original filename recorded in the gzip file header,
532 or nil if original filename is not present.
534 --- Zlib::GzipFile#comment
536 Returns comments recorded in the gzip file header, or
537 nil if the comments is not present.
539 --- Zlib::GzipFile#sync
540 --- Zlib::GzipFile#sync= flag
542 Same as IO. If ((|flag|)) is true, the associated IO object
543 must respond to flush method. While `sync' mode is true,
544 the compression ratio decreases sharply.
547 == Zlib::GzipFile::Error
549 The superclass for all exceptions raised during processing a gzip
552 The following exceptions are defined as subclasses of
553 Zlib::GzipFile::Error.
555 : Zlib::GzipFile::NoFooter
557 Raised when gzip file footer has not found.
559 : Zlib::GzipFile::CRCError
561 Raised when the CRC checksum recorded in gzip file footer
562 is not equivalent to CRC checksum of the actually
565 : Zlib::GzipFile::LengthError
567 Raised when the data length recorded in gzip file footer
568 is not equivalent to length of the actually uncompressed data.
577 The class for reading a gzipped file. GzipReader should be used
578 with associating an instance of IO class (or an object which has
579 the same methods as IO has).
581 Zlib::GzipReader.open('hoge.gz') {|gz|
585 f = File.open('hoge.gz')
586 gz = Zlib::GzipReader.new(f)
592 * ((<Zlib::GzipFile>))
594 === Included Modules:
600 --- Zlib::GzipReader.new(io)
602 Creates a GzipReader object associated with ((|io|)).
603 The GzipReader object reads gzipped data from ((|io|)),
604 and parses/decompresses them. At least, ((|io|)) must have
605 read method that behaves same as read method in IO class.
607 If the gzip file header is incorrect, raises an
608 ((<Zlib::GzipFile::Error>)) exception.
610 --- Zlib::GzipReader.wrap(io) {|gz| ... }
612 Creates a GzipReader object associated with ((|io|)), and
613 executes the block with the newly created GzipReader object,
614 just like File::open. The GzipReader object will be closed
615 automatically after executing the block. If you want to keep
616 the associated IO object opening, you may call
617 ((<Zlib::GzipFile#finish>)) method in the block.
619 --- Zlib::GzipReader.open(filename)
620 --- Zlib::GzipReader.open(filename) {|gz| ... }
622 Opens a file specified by ((|filename|)) as a gzipped file,
623 and returns a GzipReader object associated with that file.
624 Further details of this method are same as
625 ((<Zlib::GzipReader.new>)) and ((<ZLib::GzipReader.wrap>)).
629 --- Zlib::GzipReader#eof
630 --- Zlib::GzipReader#eof?
632 Returns true if the object reaches the end of compressed data.
633 Note that eof? does ((*not*)) return true when reaches the
636 --- Zlib::GzipReader#pos
637 --- Zlib::GzipReader#tell
639 Returns the total bytes of data decompressed until now.
640 Not that it does ((*not*)) the position of file pointer.
642 --- Zlib::GzipReader#each([rs])
643 --- Zlib::GzipReader#each_line([rs])
644 --- Zlib::GzipReader#each_byte([rs])
645 --- Zlib::GzipReader#gets([rs])
646 --- Zlib::GzipReader#getc
647 --- Zlib::GzipReader#lineno
648 --- Zlib::GzipReader#lineno=
649 --- Zlib::GzipReader#read([length])
650 --- Zlib::GzipReader#readchar
651 --- Zlib::GzipReader#readline([rs])
652 --- Zlib::GzipReader#readlines([rs])
653 --- Zlib::GzipReader#ungetc(char)
655 Same as IO, but raises ((<Zlib::Error>)) or
656 ((<Zlib::GzipFile::Error>)) exception if an error was found
659 Be careful of the footer of gzip file. A gzip file has
660 the checksum of pre-compressed data in its footer.
661 GzipReader checks all uncompressed data against that checksum
662 at the following cases, and if failed, raises
663 ((<Zlib::GzipFile::NoFooter>)), ((<Zlib::GzipFile::CRCError>)),
664 or ((<Zlib::GzipFile::LengthError>)) exception.
666 * When an reading request is received beyond the end of file
667 (the end of compressed data).
668 That is, when ((<Zlib::GzipReader#read>)),
669 ((<Zlib::GzipReader#gets>)), or some other methods for reading
672 * When ((<Zlib::GzipFile#close>)) method is called after
673 the object reaches the end of file.
675 * When ((<Zlib::GzipReader#unused>)) method is called after
676 the object reaches the end of file.
678 --- Zlib::GzipReader#rewind
680 Resets the position of the file pointer to the point
681 created the GzipReader object.
682 The associated IO object need to respond to seek method.
684 --- Zlib::GzipReader#unused
686 Returns the rest of the data which had read for parsing gzip
687 format, or nil if the whole gzip file is not parsed yet.
692 The class for writing a gzipped file. GzipWriter should be used
693 with associate with an instance of IO class (or an object which
694 has the same methods as IO has).
696 Zlib::GzipWriter.open('hoge.gz') {|gz|
697 gz.write 'jugemu jugemu gokou no surikire...'
700 f = File.open('hoge.gz', 'w')
701 gz = Zlib::GzipWriter.new(f)
702 gz.write 'jugemu jugemu gokou no surikire...'
705 NOTE: Due to the limitation in finalizer of Ruby, you must close
706 explicitly GzipWriter object by ((<Zlib::GzipWriter#close>)) etc.
707 Otherwise, GzipWriter should be not able to write gzip footer and
708 generate broken gzip file.
712 * ((<Zlib::GzipFile>))
716 --- Zlib::GzipWriter.new(io[, level[, strategy]])
718 Creates a GzipWriter object associated with ((|io|)).
719 ((|level|)) and ((|strategy|)) should be same as the
720 arguments of ((<Zlib::Deflate.new>)). The GzipWriter object
721 writes gzipped data to ((|io|)). At least, ((|io|)) must
722 respond to write method that behaves same as write method
725 --- Zlib::GzipWriter.wrap(io[, level[, strategy]]) {|gz| ... }
727 Creates a GzipWriter object associated with ((|io|)), and
728 executes the block with the newly created GzipWriter object,
729 just like File::open. The GzipWriter object will be closed
730 automatically after executing the block. If you want to keep
731 the associated IO object opening, you may call
732 ((<Zlib::GzipFile#finish>)) method in the block.
734 --- Zlib::GzipWriter.open(filename[, level[, strategy]])
735 --- Zlib::GzipWriter.open(filename[, level[, strategy]]) {|gz| ... }
737 Opens a file specified by ((|filename|)) for writing
738 gzip compressed data, and returns a GzipWriter object
739 associated with that file. Further details of this method
740 are same as ((<Zlib::GzipWriter.new>)) and
741 ((<Zlib::GzipWriter#wrap>)).
746 --- Zlib::GzipWriter#close
747 --- Zlib::GzipWriter#finish
749 Closes the GzipFile object. This method calls close method
750 of the associated IO object. Returns the associated IO object.
751 See ((<Zlib::GzipFile#close>)) and ((<Zlib::GzipFile#finish>))
752 for the difference between close and finish.
754 ((*NOTE: Due to the limitation in finalizer of Ruby, you must
755 close GzipWriter object explicitly. Otherwise, GzipWriter
756 should be not able to write gzip footer and generate broken
759 --- Zlib::GzipWriter#pos
760 --- Zlib::GzipWriter#tell
762 Returns the total bytes of data compressed until now.
763 Note that it does ((*not*)) the position of file pointer.
765 --- Zlib::GzipWriter#<< str
766 --- Zlib::GzipWriter#putc(ch)
767 --- Zlib::GzipWriter#puts(obj...)
768 --- Zlib::GzipWriter#print(arg...)
769 --- Zlib::GzipWriter#printf(format, arg...)
770 --- Zlib::GzipWriter#write(str)
774 --- Zlib::GzipWriter#flush([flush])
776 Flushes all the internal buffers of the GzipWriter object.
777 The meaning of ((|flush|)) is same as one of the argument of
778 ((<Zlib::Deflate#deflate>)).
779 ((<Zlib::SYNC_FLUSH>)) is used if ((|flush|)) is omitted.
780 It is no use giving ((|flush|)) ((<Zlib::NO_FLUSH>)).
782 --- Zlib::GzipWriter#mtime= time
784 Sets last modification time to be stored in the gzip file
785 header. ((<Zlib::GzipFile::Error>)) exception will be raised
786 if this method is called after writing method (like
787 ((<Zlib::GzipWriter#write>))) was called.
789 --- Zlib::GzipWriter#orig_name= filename
791 Sets original filename to be stored in the gzip file header.
792 ((<Zlib::GzipFile::Error>)) exception will be raised
793 if this method is called after writing method (like
794 ((<Zlib::GzipWriter#write>))) was called.
796 --- Zlib::GzipWriter#comment= string
798 Sets comments to be stored in the gzip file header.
799 ((<Zlib::GzipFile::Error>)) exception will be raised
800 if this method is called after writing method (like
801 ((<Zlib::GzipWriter#write>))) was called.
804 == Changes from 0.5 to 0.6
808 * ((<Zlib::GzipFile.wrap>))
809 * ((<Zlib::GzipFile#finish>))
813 * ((<Zlib::ZLIB_VERSION>))
814 * ((<Zlib::OS_VMCMS>))
815 * ((<Zlib::OS_ZSYSTEM>))
817 * ((<Zlib::OS_QDOS>))
818 * ((<Zlib::OS_RISCOS>))
819 * ((<Zlib::OS_UNKNOWN>))
823 * ((<Zlib::GzipFile.new>)) now takes no block. Use
824 ((<Zlib::GzipFile.wrap>)) instead.
826 * ((<Zlib::GzipFile#close>)) now takes no argument. Use
827 ((<Zlib::GzipFile#finish>)) instead.
831 * Zlib.version is renamed to ((<Zlib.zlib_version>)).
835 * ((<Zlib::VERSION>)) indicates the version of Ruby/zlib.
836 The zlib.h version is now in ((<Zlib::ZLIB_VERSION>)).
838 * Backward compatibility:
840 * For backward compatibility for 0.5, the obsoleted methods and
841 arguments are still available.
843 * Obsoleted classes, methods, and constants for backward
844 compatibility for 0.4 or earlier are removed.
846 == Changes from 0.4 to 0.5
848 Almost all the code are rewritten.
849 I hope all changes are enumerated below :-)
851 * The names of almost classes and some methods are changed.
852 All classes and constants are now defined under module
853 ((<Zlib>)). The obsoleted names are also available for backward
858 * Deflate -> ((<Zlib::Deflate>))
859 * Inflate -> ((<Zlib::Inflate>))
860 * Zlib::Gzip -> ((<Zlib::GzipFile>))
861 * GzipReader -> ((<Zlib::GzipReader>))
862 * GzipWriter -> ((<Zlib::GzipWriter>))
863 * Zlib::Gzip::Error -> ((<Zlib::GzipFile::Error>))
864 * Zlib::GzipReader::NoFooter -> ((<Zlib::GzipFile::NoFooter>))
865 * Zlib::GzipReader::CRCError -> ((<Zlib::GzipFile::CRCError>))
866 * Zlib::GzipReader::LengthError -> ((<Zlib::GzipFile::LengthError>))
870 * Zlib::ZStream::BINARY -> ((<Zlib::BINARY>))
871 * Zlib::ZStream::ASCII -> ((<Zlib::ASCII>))
872 * Zlib::ZStream::UNKNOWN -> ((<Zlib::UNKNOWN>))
873 * Zlib::Deflate::NO_COMPRESSION -> ((<Zlib::NO_COMPRESSION>))
874 * Zlib::Deflate::BEST_SPEED -> ((<Zlib::BEST_SPEED>))
875 * Zlib::Deflate::BEST_COMPRESSION -> ((<Zlib::BEST_COMPRESSION>))
876 * Zlib::Deflate::DEFAULT_COMPRESSION -> ((<Zlib::DEFAULT_COMPRESSION>))
877 * Zlib::Deflate::FILTERED -> ((<Zlib::FILTERED>))
878 * Zlib::Deflate::HUFFMAN_ONLY -> ((<Zlib::HUFFMAN_ONLY>))
879 * Zlib::Deflate::DEFAULT_STRATEGY -> ((<Zlib::DEFAULT_STRATEGY>))
880 * Zlib::Deflate::MAX_WBITS -> ((<Zlib::MAX_WBITS>))
881 * Zlib::Deflate::DEF_MEM_LEVEL -> ((<Zlib::DEF_MEM_LEVEL>))
882 * Zlib::Deflate::MAX_MEM_LEVEL -> ((<Zlib::MAX_MEM_LEVEL>))
883 * Zlib::Deflate::NO_FLUSH -> ((<Zlib::NO_FLUSH>))
884 * Zlib::Deflate::SYNC_FLUSH -> ((<Zlib::SYNC_FLUSH>))
885 * Zlib::Deflate::FULL_FLUSH -> ((<Zlib::FULL_FLUSH>))
886 * Zlib::Inflate::MAX_WBITS -> ((<Zlib::MAX_WBITS>))
887 * Zlib::GzipReader::OS_* -> ((<Zlib::OS_*|Zlib::OS_CODE>))
891 * Zlib::ZStream#flush_out -> ((<Zlib::ZStream#flush_next_out>))
893 * Made buffer for input (next_in).
895 * ((<Zlib::GzipReader#unused>)) returns nil after closing.
897 * Now you are up to call ((<Zlib::GzipWriter#close>)) explicitly
898 to avoid segv in finalizer.
899 ((<[ruby-dev:11915]|URL:http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/11915>))
901 * divided initialize from new.
903 * remove sanity checks for arguments for deflateInit2 and
906 * adapted the behavior of ((<Zlib::GzipWriter#puts>)) to Ruby-1.7.
908 * Made all functions static.