Ruby Zlib::Deflate Functions

EditRocket provides the following information on Zlib::Deflate functions in the Ruby source code builder.

deflate" Zlib::Deflate.deflate(string[, level]) - Compresses the given string. Valid values of level are Zlib::NO_COMPRESSION, Zlib::BEST_SPEED, Zlib::BEST_COMPRESSION, Zlib::DEFAULT_COMPRESSION, and an integer from 0 to 9.

deflate" Zlib::Deflate.deflate(string[, level]) - Compresses the given string. Valid values of level are Zlib::NO_COMPRESSION, Zlib::BEST_SPEED, Zlib::BEST_COMPRESSION, Zlib::DEFAULT_COMPRESSION, and an integer from 0 to 9.

flush" flush(flush) - This method is equivalent to deflate('', flush). If flush is omitted, Zlib::SYNC_FLUSH is used as flush. This method is just provided to improve the readability of your Ruby program.

initialize_copy() - Duplicates the deflate stream.

new" Zlib::Deflate.new(level=nil, windowBits=nil, memlevel=nil, strategy=nil) - Creates a new deflate stream for compression. See zlib.h for details of each argument. If an argument is nil, the default value of that argument is used.

params" params(level, strategy) - Changes the parameters of the deflate stream. See zlib.h for details. The output from the stream by changing the params is preserved in output buffer.

set_dictionary" set_dictionary(string) - Sets the preset dictionary and returns string. This method is available just only after Zlib::Deflate.new or Zlib::ZStream#reset method was called. See zlib.h for details.