lib/ruby/truffle/pr-zlib/lib/pr/rbzlib.rb
# Read a new buffer from the current input stream, update the adler32
# and total number of bytes read.  All deflate() input goes through
# this function so some applications may wish to modify it to avoid
# allocating a large strm->next_in buffer and copying from it.
# (See also flush_pending()).
Read a new buffer from the current input stream, update the adler32
and total number of bytes read.  All deflate() input goes through
this function so some applications may wish to modify it to avoid
allocating a large strm->next_in buffer and copying from it.
Read a new buffer from the current input stream update the adler32 and total number of bytes read . All deflate () input goes through this function so some applications may wish to modify it to avoid allocating a large strm - > next_in buffer and copying from it .
def read_buf(strm,buf,offset,size)
    len = strm.avail_in
    if (len > size)
      len = size
    end
    if len == 0
      return 0
    end
    strm.avail_in -= len
    if strm.state.wrap == 1
      strm.adler = adler32(strm.adler, strm.next_in.current,len)
    elsif (strm.state.wrap == 2)
      strm.adler = crc32(strm.adler,strm.next_in.current,len)
    end
    buf[offset,len] = strm.next_in.current[0,len]
    strm.next_in += len
    strm.total_in += len
    return len
  end
def read_buf ( strm , buf , offset , size ) len = strm . avail_in if ( len > size ) len = size end if len == 0 return 0 end strm . avail_in -= len if strm . state . wrap == 1 strm . adler = adler32 ( strm . adler , strm . next_in . current , len ) elsif ( strm . state . wrap == 2 ) strm . adler = crc32 ( strm . adler , strm . next_in . current , len ) end buf [ offset , len ] = strm . next_in . current [ 0 , len ] strm . next_in += len strm . total_in += len return len end
Read a new buffer from the current input stream, update the adler32
and total number of bytes read.
Read a new buffer from the current input stream update the adler32 and total number of bytes read .
strm
<not_specific>
buf
<not_specific>
offset
<not_specific>
size
<not_specific>