call-seq:
z.deflate(string, flush = Zstdlib::NO_FLUSH) -> String
z.deflate(string, flush = Zstdlib::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 Zstdlib::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:
Zstdlib::NO_FLUSH:: The default
Zstdlib::SYNC_FLUSH:: Flushes the output to a byte boundary
Zstdlib::FULL_FLUSH:: SYNC_FLUSH + resets the compression state
Zstdlib::FINISH:: Pending input is processed, pending output is flushed.
See the constants for further description.