lib/ruby/truffle/pr-zlib/lib/pr/rbzlib.rb
# Copy a stored block, storing first the length and its
# one's complement if requested.
Copy a stored block, storing first the length and its
one's complement if requested.
Copy a stored block storing first the length and its one ' s complement if requested .
def copy_block(s,buf,len,header)
    bi_windup(s)
    s.last_eob_len = 8
    if header
      s.pending_buf[s.pending] = len & 0xff
      s.pending+=1
      s.pending_buf[s.pending] = len >> 8
      s.pending+=1
      s.pending_buf[s.pending] = ((~len) & 0xff)
      s.pending+=1
      s.pending_buf[s.pending] = ((~len) >> 8) & 0xff
      s.pending+=1
    end
    i = 0
    while len != 0
      len-=1
      s.pending_buf[s.pending] = buf[i].ord
      i+=1
      s.pending+=1
    end
  end
def copy_block ( s , buf , len , header ) bi_windup ( s ) s . last_eob_len = 8 if header s . pending_buf [ s . pending ] = len & 0xff s . pending += 1 s . pending_buf [ s . pending ] = len >> 8 s . pending += 1 s . pending_buf [ s . pending ] = ( ( ~ len ) & 0xff ) s . pending += 1 s . pending_buf [ s . pending ] = ( ( ~ len ) >> 8 ) & 0xff s . pending += 1 end i = 0 while len != 0 len -= 1 s . pending_buf [ s . pending ] = buf [ i ] . ord i += 1 s . pending += 1 end end
Copy a stored block, storing first the length and its
one's complement if requested.
Copy a stored block storing first the length and its one ' s complement if requested .
s
<not_specific>
buf
<not_specific>
len
<not_specific>
header
<not_specific>