lib/ruby/truffle/pr-zlib/lib/pr/rbzlib.rb
# Cleanup then free the given gz_stream. Return a zlib error code.
Cleanup then free the given gz_stream. Return a zlib error code.
Cleanup then free the given gz_stream . Return a zlib error code .
def destroy(s)
    err = Z_OK
    return Z_STREAM_ERROR if s.nil?
    if s.stream.state
      if s.mode == 'w'
        err = deflateEnd(s.stream)
      elsif s.mode == 'r'
        err = inflateEnd(s.stream)
      end
    end
    begin
      s.file.close if s.file
      s.file = nil
    rescue
      err = Z_ERRNO
    end
    if s.z_err < 0
      err = s.z_err
    end
    return err
  end
def destroy ( s ) err = Z_OK return Z_STREAM_ERROR if s . nil? if s . stream . state if s . mode == 'w' err = deflateEnd ( s . stream ) elsif s . mode == 'r' err = inflateEnd ( s . stream ) end end begin s . file . close if s . file s . file = nil rescue err = Z_ERRNO end if s . z_err < 0 err = s . z_err end return err end
Cleanup then free the given gz_stream.
Cleanup then free the given gz_stream .
s
<not_specific>