ComponentAce.Compression.Libs.zlib.ZStream.flush_pending C# (CSharp) Метод

flush_pending() приватный Метод

private flush_pending ( ) : void
Результат void
        internal void flush_pending()
        {
            int len = dstate.pending;

            if (len > avail_out)
                len = avail_out;
            if (len == 0)
                return ;

            if (dstate.pending_buf.Length <= dstate.pending_out || next_out.Length <= next_out_index || dstate.pending_buf.Length < (dstate.pending_out + len) || next_out.Length < (next_out_index + len))
            {
                //System.Console.Out.WriteLine(dstate.pending_buf.Length + ", " + dstate.pending_out + ", " + next_out.Length + ", " + next_out_index + ", " + len);
                //System.Console.Out.WriteLine("avail_out=" + avail_out);
            }

            Buffer.BlockCopy(dstate.pending_buf, dstate.pending_out, next_out, next_out_index, len);

            next_out_index += len;
            dstate.pending_out += len;
            total_out += len;
            avail_out -= len;
            dstate.pending -= len;
            if (dstate.pending == 0)
            {
                dstate.pending_out = 0;
            }
        }

Usage Example

Пример #1
0
 internal void flush_block_only(bool eof)
 {
     _tr_flush_block((block_start < 0) ? (-1) : block_start, strstart - block_start, eof);
     block_start = strstart;
     strm.flush_pending();
 }
All Usage Examples Of ComponentAce.Compression.Libs.zlib.ZStream::flush_pending