Repository URL to install this package:
|
Version:
2.2.2-1 ▾
|
U:RDoc::NormalModule[iI" Zlib:ET@0o:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[ I"QThis module provides access to the {zlib library}[http://zlib.net]. Zlib is ;TI"Odesigned to be a portable, free, general-purpose, legally unencumbered -- ;TI"Nthat is, not covered by any patents -- lossless data-compression library ;TI"Efor use on virtually any computer hardware and operating system.;To:RDoc::Markup::BlankLine o; ;[I"EThe zlib compression library provides in-memory compression and ;TI"Mdecompression functions, including integrity checks of the uncompressed ;TI"
data.;T@o; ;[I"JThe zlib compressed data format is described in RFC 1950, which is a ;TI"Dwrapper around a deflate stream which is described in RFC 1951.;T@o; ;[I"NThe library also supports reading and writing files in gzip (.gz) format ;TI"Nwith an interface similar to that of IO. The gzip format is described in ;TI">RFC 1952 which is also a wrapper around a deflate stream.;T@o; ;[ I"RThe zlib format was designed to be compact and fast for use in memory and on ;TI"Kcommunications channels. The gzip format was designed for single-file ;TI"Lcompression on file systems, has a larger header than zlib to maintain ;TI"Pdirectory information, and uses a different, slower check method than zlib.;T@o; ;[I"@See your system's zlib.h for further information about zlib;T@S:RDoc::Markup::Heading:
leveli: textI"Sample usage;T@o; ;[I"LUsing the wrapper to compress strings with default parameters is quite ;TI"simple:;T@o:RDoc::Markup::Verbatim;[I"require "zlib"
;TI"
;TI"5data_to_compress = File.read("don_quixote.txt")
;TI"
;TI"1puts "Input size: #{data_to_compress.size}"
;TI"#=> Input size: 2347740
;TI"
;TI"?data_compressed = Zlib::Deflate.deflate(data_to_compress)
;TI"
;TI"5puts "Compressed size: #{data_compressed.size}"
;TI"!#=> Compressed size: 887238
;TI"
;TI"@uncompressed_data = Zlib::Inflate.inflate(data_compressed)
;TI"
;TI"7puts "Uncompressed data is: #{uncompressed_data}"
;TI"M#=> Uncompressed data is: The Project Gutenberg EBook of Don Quixote...
;T:@format0S;;i;
I"Class tree;T@o:RDoc::Markup::List:
@type:BULLET:@items[ o:RDoc::Markup::ListItem:@label0;[o; ;[I"Zlib::Deflate;To;;0;[o; ;[I"Zlib::Inflate;To;;0;[o; ;[I"Zlib::ZStream;To;;0;[o; ;[I"Zlib::Error;To;;;;[o;;0;[o; ;[I"Zlib::StreamEnd;To;;0;[o; ;[I"Zlib::NeedDict;To;;0;[o; ;[I"Zlib::DataError;To;;0;[o; ;[I"Zlib::StreamError;To;;0;[o; ;[I"Zlib::MemError;To;;0;[o; ;[I"Zlib::BufError;To;;0;[o; ;[I"Zlib::VersionError;T@o; ;[I"(if you have GZIP_SUPPORT);To;;;;[ o;;0;[o; ;[I"Zlib::GzipReader;To;;0;[o; ;[I"Zlib::GzipWriter;To;;0;[o; ;[I"Zlib::GzipFile;To;;0;[o; ;[I"Zlib::GzipFile::Error;To;;;;[o;;0;[o; ;[I" Zlib::GzipFile::LengthError;To;;0;[o; ;[I"Zlib::GzipFile::CRCError;To;;0;[o; ;[I"Zlib::GzipFile::NoFooter;T:
@fileI"ext/zlib/zlib.c;T:0@omit_headings_from_table_of_contents_below0;0;0[ [+U:RDoc::Constant[i I"VERSION;TI"Zlib::VERSION;T00o;;[o; ;[I""The Ruby/zlib version string.;T@;@¤;0@¤@cRDoc::NormalModule0U;[i I"ZLIB_VERSION;TI"Zlib::ZLIB_VERSION;T00o;;[o; ;[I"6The string which represents the version of zlib.h;T@;@¤;0@¤@@°0U;[i I"BINARY;TI"Zlib::BINARY;T00o;;[ o; ;[I"2Represents binary data as guessed by deflate.;T@o; ;[I"!See Zlib::Deflate#data_type.;T@;@¤;0@¤@@°0U;[i I"
ASCII;TI"Zlib::ASCII;T00o;;[o; ;[I"0Represents text data as guessed by deflate.;T@o; ;[I"MNOTE: The underlying constant Z_ASCII was deprecated in favor of Z_TEXT ;TI"Cin zlib 1.2.2. New applications should not use this constant.;T@o; ;[I"!See Zlib::Deflate#data_type.;T@;@¤;0@¤@@°0U;[i I" TEXT;TI"Zlib::TEXT;T00o;;[ o; ;[I"0Represents text data as guessed by deflate.;T@o; ;[I"!See Zlib::Deflate#data_type.;T@;@¤;0@¤@@°0U;[i I"UNKNOWN;TI"Zlib::UNKNOWN;T00o;;[ o; ;[I";Represents an unknown data type as guessed by deflate.;T@o; ;[I"!See Zlib::Deflate#data_type.;T@;@¤;0@¤@@°0U;[i I"NO_COMPRESSION;TI"Zlib::NO_COMPRESSION;T00o;;[o; ;[I"LNo compression, passes through data untouched. Use this for appending ;TI"-pre-compressed data to a deflate stream.;T;@¤;0@¤@@°0U;[i I"BEST_SPEED;TI"Zlib::BEST_SPEED;T00o;;[o; ;[I"CFastest compression level, but with with lowest space savings.;T@;@¤;0@¤@@°0U;[i I"BEST_COMPRESSION;TI"Zlib::BEST_COMPRESSION;T00o;;[o; ;[I"@Slowest compression level, but with the best space savings.;T@;@¤;0@¤@@°0U;[i I"DEFAULT_COMPRESSION;TI"Zlib::DEFAULT_COMPRESSION;T00o;;[o; ;[I"KDefault compression level which is a good trade-off between space and ;TI" time;T;@¤;0@¤@@°0U;[i I"
FILTERED;TI"Zlib::FILTERED;T00o;;[o; ;[
I"HDeflate strategy for data produced by a filter (or predictor). The ;TI"Geffect of FILTERED is to force more Huffman codes and less string ;TI"Hmatching; it is somewhat intermediate between DEFAULT_STRATEGY and ;TI"HHUFFMAN_ONLY. Filtered data consists mostly of small values with a ;TI""somewhat random distribution.;T;@¤;0@¤@@°0U;[i I"HUFFMAN_ONLY;TI"Zlib::HUFFMAN_ONLY;T00o;;[o; ;[I"IDeflate strategy which uses Huffman codes only (no string matching).;T@;@¤;0@¤@@°0U;[i I"RLE;TI"Zlib::RLE;T00o;;[o; ;[I"CDeflate compression strategy designed to be almost as fast as ;TI"BHUFFMAN_ONLY, but give better compression for PNG image data.;T;@¤;0@¤@@°0U;[i I"
FIXED;TI"Zlib::FIXED;T00o;;[o; ;[I"GDeflate strategy which prevents the use of dynamic Huffman codes, ;TI"Aallowing for a simpler decoder for specialized applications.;T;@¤;0@¤@@°0U;[i I"DEFAULT_STRATEGY;TI"Zlib::DEFAULT_STRATEGY;T00o;;[o; ;[I"<Default deflate strategy which is used for normal data.;T@;@¤;0@¤@@°0U;[i I"MAX_WBITS;TI"Zlib::MAX_WBITS;T00o;;[o; ;[I"IThe maximum size of the zlib history buffer. Note that zlib allows ;TI"Mlarger values to enable different inflate modes. See Zlib::Inflate.new ;TI"for details.;T;@¤;0@¤@@°0U;[i I"DEF_MEM_LEVEL;TI"Zlib::DEF_MEM_LEVEL;T00o;;[o; ;[I"LThe default memory level for allocating zlib deflate compression state.;T;@¤;0@¤@@°0U;[i I"MAX_MEM_LEVEL;TI"Zlib::MAX_MEM_LEVEL;T00o;;[o; ;[I"LThe maximum memory level for allocating zlib deflate compression state.;T;@¤;0@¤@@°0U;[i I"
NO_FLUSH;TI"Zlib::NO_FLUSH;T00o;;[o; ;[I"KNO_FLUSH is the default flush method and allows deflate to decide how ;TI"Jmuch data to accumulate before producing output in order to maximize ;TI"compression.;T;@¤;0@¤@@°0U;[i I"SYNC_FLUSH;TI"Zlib::SYNC_FLUSH;T00o;;[o; ;[ I"KThe SYNC_FLUSH method flushes all pending output to the output buffer ;TI"Hand the output is aligned on a byte boundary. Flushing may degrade ;TI"Hcompression so it should be used only when necessary, such as at a ;TI"7request or response boundary for a network stream.;T;@¤;0@¤@@°0U;[i I"FULL_FLUSH;TI"Zlib::FULL_FLUSH;T00o;;[o; ;[
I"IFlushes all output as with SYNC_FLUSH, and the compression state is ;TI"Ireset so that decompression can restart from this point if previous ;TI"Kcompressed data has been damaged or if random access is desired. Like ;TI"BSYNC_FLUSH, using FULL_FLUSH too often can seriously degrade ;TI"compression.;T;@¤;0@¤@@°0U;[i I"FINISH;TI"Zlib::FINISH;T00o;;[o; ;[I"<Processes all pending input and flushes pending output.;T@;@¤;0@¤@@°0U;[i I"OS_CODE;TI"Zlib::OS_CODE;T00o;;[o; ;[I" The OS code of current host;T@;@¤;0@¤@@°0U;[i I"
OS_MSDOS;TI"Zlib::OS_MSDOS;T00o;;[o; ;[I"OS code for MSDOS hosts;T@;@¤;0@¤@@°0U;[i I"
OS_AMIGA;TI"Zlib::OS_AMIGA;T00o;;[o; ;[I"OS code for Amiga hosts;T@;@¤;0@¤@@°0U;[i I"OS_VMS;TI"Zlib::OS_VMS;T00o;;[o; ;[I"OS code for VMS hosts;T@;@¤;0@¤@@°0U;[i I"OS_UNIX;TI"Zlib::OS_UNIX;T00o;;[o; ;[I"OS code for UNIX hosts;T@;@¤;0@¤@@°0U;[i I"
OS_ATARI;TI"Zlib::OS_ATARI;T00o;;[o; ;[I"OS code for Atari hosts;T@;@¤;0@¤@@°0U;[i I"OS_OS2;TI"Zlib::OS_OS2;T00o;;[o; ;[I"OS code for OS2 hosts;T@;@¤;0@¤@@°0U;[i I"
OS_MACOS;TI"Zlib::OS_MACOS;T00o;;[o; ;[I"OS code for Mac OS hosts;T@;@¤;0@¤@@°0U;[i I"OS_TOPS20;TI"Zlib::OS_TOPS20;T00o;;[o; ;[I"OS code for TOPS-20 hosts;T@;@¤;0@¤@@°0U;[i I"
OS_WIN32;TI"Zlib::OS_WIN32;T00o;;[o; ;[I"OS code for Win32 hosts;T@;@¤;0@¤@@°0U;[i I"
OS_VMCMS;TI"Zlib::OS_VMCMS;T00o;;[o; ;[I"OS code for VM OS hosts;T@;@¤;0@¤@@°0U;[i I"OS_ZSYSTEM;TI"Zlib::OS_ZSYSTEM;T00o;;[o; ;[I"OS code for Z-System hosts;T@;@¤;0@¤@@°0U;[i I"OS_CPM;TI"Zlib::OS_CPM;T00o;;[o; ;[I"OS code for CP/M hosts;T@;@¤;0@¤@@°0U;[i I"OS_QDOS;TI"Zlib::OS_QDOS;T00o;;[o; ;[I"OS code for QDOS hosts;T@;@¤;0@¤@@°0U;[i I"OS_RISCOS;TI"Zlib::OS_RISCOS;T00o;;[o; ;[I"OS code for RISC OS hosts;T@;@¤;0@¤@@°0U;[i I"OS_UNKNOWN;TI"Zlib::OS_UNKNOWN;T00o;;[o; ;[I"OS code for unknown hosts;T@;@¤;0@¤@@°0[ [[I"
class;T[[:public[
[I"adler32;TI"ext/zlib/zlib.c;T[I"adler32_combine;T@*[I"
crc32;T@*[I"crc32_combine;T@*[I"crc_table;T@*[I"deflate;T@*[I"inflate;T@*[I"zlib_version;T@*[:protected[ [:private[ [I"
instance;T[[;[ [;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ;0;0[@¤I"lib/csv.rb;TI"lib/net/http/response.rb;TI"%lib/rdoc/generator/json_index.rb;TI"lib/rubygems.rb;TI"lib/rubygems/indexer.rb;TI"lib/rubygems/package.rb;TI" lib/rubygems/package/old.rb;TI"lib/rubygems/test_case.rb;TI"lib/rubygems/util.rb;T@¤cRDoc::TopLevel