This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.

deflate

        # Zlib::Deflate.deflate

(from ruby core)
### Implementation from Deflate
---
    Zlib.deflate(string[, level])
    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, or an integer from 0 to 9.

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


(from ruby core)
### Implementation from Deflate
---
    z.deflate(string, flush = Zlib::NO_FLUSH)                 -> String
    z.deflate(string, flush = Zlib::NO_FLUSH) { |chunk| ... } -> nil

---

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 the block and `nil` is returned.

The `flush` parameter specifies the flush mode.  The following constants
may be used:

Zlib::NO_FLUSH
:   The default
Zlib::SYNC_FLUSH
:   Flushes the output to a byte boundary
Zlib::FULL_FLUSH
:   SYNC_FLUSH + resets the compression state
Zlib::FINISH
:   Pending input is processed, pending output is flushed.


See the constants for further description.



      

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.