def do_deflate(data, flush)
      if data.nil? then
        run '', Zlib::FINISH
      else
        data = StringValue data

        if flush != Zlib::NO_FLUSH or not data.empty? then # prevent BUF_ERROR
          run data, flush
        end
      end
    end
def do_deflate(data, flush)
      if data.nil? then
        run '', Zlib::FINISH
      else
        data = StringValue data

        if flush != Zlib::NO_FLUSH or not data.empty? then # prevent BUF_ERROR
          run data, flush
        end
      end
    end
Performs the deflate operation and leaves the compressed data in the
 output buffer