예제 #1
0
 /// <summary>Creates a new compressor using the specified compression level.</summary>
 /// <remarks>
 /// Creates a new compressor using the specified compression level.
 /// Compressed data will be generated in ZLIB format.
 /// </remarks>
 /// <param name="level">Compression level #CompressionLevel</param>
 /// <param name="strategy">Compression strategy #CompressionStrategy</param>
 /// <param name="header">Compression header #CompressionHeader</param>
 /// <param name="directBufferSize">Size of the direct buffer to be used.</param>
 public ZlibCompressor(ZlibCompressor.CompressionLevel level, ZlibCompressor.CompressionStrategy
                       strategy, ZlibCompressor.CompressionHeader header, int directBufferSize)
 {
     this.level      = level;
     this.strategy   = strategy;
     this.windowBits = header;
     stream          = Init(this.level.CompressionLevel(), this.strategy.CompressionStrategy(),
                            this.windowBits.WindowBits());
     this.directBufferSize = directBufferSize;
     uncompressedDirectBuf = ByteBuffer.AllocateDirect(directBufferSize);
     compressedDirectBuf   = ByteBuffer.AllocateDirect(directBufferSize);
     compressedDirectBuf.Position(directBufferSize);
 }
예제 #2
0
 protected internal void Construct(ZlibCompressor.CompressionLevel level, ZlibCompressor.CompressionStrategy
                                   strategy, ZlibCompressor.CompressionHeader header, int directBufferSize)
 {
 }