ICSharpCode.SharpZipLib.Zip.Compression.Deflater.Flush C# (CSharp) Method

Flush() public method

Flushes the current input block. Further calls to deflate() will produce enough output to inflate everything in the current input block. This is not part of Sun's JDK so I have made it package private. It is used by DeflaterOutputStream to implement flush().
public Flush ( ) : void
return void
        public void Flush()
        {
            state |= IS_FLUSHING;
        }

Usage Example

Example #1
0
 //cualquiera de las dos funciones de comprimir causa un leak de memoria enorme
 public static int ComprimirBuffer(byte[] in_buffer,ref byte[] out_buffer)
 {
     out_buffer=new byte[in_buffer.Length+300];
     Deflater compresor=new Deflater();
     compresor.SetInput(in_buffer);
     compresor.Flush();
     compresor.Finish();
     int compressedsize=compresor.Deflate(out_buffer,0,(int)(in_buffer.Length)+300);
     compresor=null;
     return compressedsize;
 }