z.deflate(string, flush = Zlib::NO_FLUSH) â String
z.deflate(string, flush = Zlib::NO_FLUSH) { |chunk| ... } â nil
z.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 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.
Please login to continue.