lib/ruby/truffle/pr-zlib/lib/pr/rbzlib.rb
# Update the compression level and strategy
#
Update the compression level and strategy
Update the compression level and strategy
def gzsetparams(file,level,strategy)
    s = file
    if s.nil? || s.mode != 'w'
      return Z_STREAM_ERROR
    end
    if s.stream.avail_out == 0
      s.stream.next_out = Bytef.new(s.outbuf)
      written = s.file.write(s.outbuf)
      if written != Z_BUFSIZE
        s.z_err = Z_ERRNO
      end
      s.stream.avail_out = Z_BUFSIZE
    end
    return deflateParams(s.stream, level, strategy)
  end
def gzsetparams ( file , level , strategy ) s = file if s . nil? || s . mode != 'w' return Z_STREAM_ERROR end if s . stream . avail_out == 0 s . stream . next_out = Bytef . new ( s . outbuf ) written = s . file . write ( s . outbuf ) if written != Z_BUFSIZE s . z_err = Z_ERRNO end s . stream . avail_out = Z_BUFSIZE end return deflateParams ( s . stream , level , strategy ) end
Update the compression level and strategy
Update the compression level and strategy
file
<not_specific>
level
<not_specific>
strategy
<not_specific>