lib/ruby/truffle/pr-zlib/lib/pr/rbzlib.rb
# Copy the source state to the destination state.
# To simplify the source, this is not supported for 16-bit MSDOS (which
# doesn't have enough memory anyway to duplicate compression states).
Copy the source state to the destination state.
To simplify the source, this is not supported for 16-bit MSDOS (which
doesn't have enough memory anyway to duplicate compression states).
Copy the source state to the destination state . To simplify the source this is not supported for 16 - bit MSDOS ( which doesn ' t have enough memory anyway to duplicate compression states ) .
def deflateCopy(dest,source)
    if source.nil? || dest.nil? || source.state.nil?
      return Z_STREAM_ERROR
    end
    ss = (source.state)
    dest = source.dup
    ds = Deflate_state.new
    dest.state = ds
    ds = ss.dup
    ds.strm = dest
    ds.window = ss.window.dup
    ds.prev = ss.prev.dup
    ds.head = ss.head.dup
    ds.pending_buf = ss.pending_buf.dup
    ds.pending_buf.buffer = ss.pending_buf.buffer.dup
    ds.pending_out = Bytef.new(ds.pending_buf,ss.pending_out.offset)
    ds.d_buf = Posf.new(ds.pending_buf,ds.lit_bufsize)
    ds.l_buf = Bytef.new(ds.pending_buf,(1+2) * ds.lit_bufsize)
    ds.l_desc.dyn_tree = ds.dyn_ltree
    ds.d_desc.dyn_tree = ds.dyn_dtree
    ds.bl_desc.dyn_tree = ds.bl_tree
    return Z_OK
  end
def deflateCopy ( dest , source ) if source . nil? || dest . nil? || source . state . nil? return Z_STREAM_ERROR end ss = ( source . state ) dest = source . dup ds = Deflate_state . new dest . state = ds ds = ss . dup ds . strm = dest ds . window = ss . window . dup ds . prev = ss . prev . dup ds . head = ss . head . dup ds . pending_buf = ss . pending_buf . dup ds . pending_buf . buffer = ss . pending_buf . buffer . dup ds . pending_out = Bytef . new ( ds . pending_buf , ss . pending_out . offset ) ds . d_buf = Posf . new ( ds . pending_buf , ds . lit_bufsize ) ds . l_buf = Bytef . new ( ds . pending_buf , ( 1 + 2 ) * ds . lit_bufsize ) ds . l_desc . dyn_tree = ds . dyn_ltree ds . d_desc . dyn_tree = ds . dyn_dtree ds . bl_desc . dyn_tree = ds . bl_tree return Z_OK end
Copy the source state to the destination state.
Copy the source state to the destination state .
dest
<not_specific>
source
<not_specific>