This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.
# Zlib::Inflate.inflate (from ruby core) ### Implementation from Inflate --- Zlib.inflate(string) Zlib::Inflate.inflate(string) --- Decompresses `string`. Raises a Zlib::NeedDict exception if a preset dictionary is needed for decompression. This method is almost equivalent to the following code: def inflate(string) zstream = Zlib::Inflate.new buf = zstream.inflate(string) zstream.finish zstream.close buf end See also Zlib.deflate (from ruby core) ### Implementation from Inflate --- inflate(deflate_string, buffer: nil) -> String inflate(deflate_string, buffer: nil) { |chunk| ... } -> nil --- Inputs `deflate_string` into the inflate stream and returns the output from the stream. Calling this method, both the input and the output buffer 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 inflated chunks from the `deflate_string` are yielded to the block and `nil` is returned. If a :buffer keyword argument is given and not nil: * The :buffer keyword should be a String, and will used as the output buffer. Using this option can reuse the memory required during inflation. * When not passing a block, the return value will be the same object as the :buffer keyword argument. * When passing a block, the yielded chunks will be the same value as the :buffer keyword argument. Raises a Zlib::NeedDict exception if a preset dictionary is needed to decompress. Set the dictionary by Zlib::Inflate#set_dictionary and then call this method again with an empty string to flush the stream: inflater = Zlib::Inflate.new begin out = inflater.inflate compressed rescue Zlib::NeedDict # ensure the dictionary matches the stream's required dictionary raise unless inflater.adler == Zlib.adler32(dictionary) inflater.set_dictionary dictionary inflater.inflate '' end # ... inflater.close See also Zlib::Inflate.new
This is MURDOC! A Ruby documentation browser inspired by Smalltalk-80. It allows you to learn about Ruby by browsing through its class hierarchies, and see any of its methods.