initialize_copy

initialize_copy(p1) Instance Public methods Duplicates the deflate stream.

flush

flush(flush = Zlib::SYNC_FLUSH) â Stringflush(flush = Zlib::SYNC_FLUSH) { |chunk| ... } â nil Instance Public methods This method is equivalent to deflate('', flush). This method is just provided to improve the readability of your Ruby program. If a block is given chunks of deflate output are yielded to the block until the buffer is flushed. See #deflate for detail on the flush constants NO_FLUSH, SYNC_FLUSH, FULL_FLUSH and FINISH.

deflate 2

z.deflate(string, flush = Zlib::NO_FLUSH) â Stringz.deflate(string, flush = Zlib::NO_FLUSH) { |chunk| ... } â nil Instance Public methods Inputs string into the deflate stream and returns the output from the stream. On calling this method, both the input and the output buffers of the stream are flushed. If string is nil, this method finishes the stream, just like Zlib::ZStream#finish. If a block is given consecutive deflated chunks from the string are yielded to

<<

Instance Public methods Inputs string into the deflate stream just like #deflate, but returns the Zlib::Deflate object itself. The output from the stream is preserved in output buffer.

new

Zlib::Deflate.new(level=DEFAULT_COMPRESSION, window_bits=MAX_WBITS, mem_level=DEF_MEM_LEVEL, strategy=DEFAULT_STRATEGY) Class Public methods Creates a new deflate stream for compression. If a given argument is nil, the default value of that argument is used. The level sets the compression level for the deflate stream between 0 (no compression) and 9 (best compression. The following constants have been defined to make code more readable: Zlib::NO_COMPRESSION = 0 Zlib::BEST_SPEED

deflate

Zlib.deflate(string[, level])Zlib::Deflate.deflate(string[, level]) Class Public methods Compresses the given string. Valid values of level are Zlib::NO_COMPRESSION, Zlib::BEST_SPEED, Zlib::BEST_COMPRESSION, Zlib::DEFAULT_COMPRESSION, or an integer from 0 to 9 (the default is 6). This method is almost equivalent to the following code: def deflate(string, level) z = Zlib::Deflate.new(level) dst = z.deflate(string, Zlib::FINISH) z.close dst end See also Zlib.inflate

new

initialize( file_name, yaml_opts = {} ) Class Public methods Creates a new YAML::Store object, which will store data in file_name. If the file does not already exist, it will be created. Options passed in through yaml_opts will be used when converting the store to YAML via Object#to_yaml.

values_at

values_at( *keys ) Instance Public methods Returns an array containing the values associated with the given keys.

values

values() Instance Public methods Returns an array of values from the database.

update

update( hsh ) Instance Public methods Updates the database with multiple values from the specified object. Takes any object which implements the #each_pair method, including Hash and DBM objects. Returns self.