This filter stream is used to compress a stream into a "GZIP" stream. The "GZIP" format is described in RFC 1952.
More...
|
| | GZipOutputStream (Stream baseOutputStream) |
| | Creates a GzipOutputStream with the default buffer size.
|
| | GZipOutputStream (Stream baseOutputStream, int size) |
| | Creates a GZipOutputStream with the specified buffer size.
|
| void | SetLevel (int level) |
| | Sets the active compression level (1-9). The new level will be activated immediately.
|
| int | GetLevel () |
| | Get the current compression level.
|
| override void | Write (byte[] buffer, int offset, int count) |
| | Write given buffer to output updating crc.
|
| override void | Close () |
| | Writes remaining compressed output data to the output stream and closes it.
|
| override void | Finish () |
| | Finish compression and write any footer information required to stream.
|
| | DeflaterOutputStream (Stream baseOutputStream) |
| | Creates a new DeflaterOutputStream with a default Deflater and default buffer size.
|
| | DeflaterOutputStream (Stream baseOutputStream, Deflater deflater) |
| | Creates a new DeflaterOutputStream with the given Deflater and default buffer size.
|
| | DeflaterOutputStream (Stream baseOutputStream, Deflater deflater, int bufferSize) |
| | Creates a new DeflaterOutputStream with the given Deflater and buffer size.
|
| override long | Seek (long offset, SeekOrigin origin) |
| | Sets the current position of this stream to the given value. Not supported by this class!
|
| override void | SetLength (long value) |
| | Sets the length of this stream to the given value. Not supported by this class!
|
| override int | ReadByte () |
| | Read a byte from stream advancing position by one.
|
| override int | Read (byte[] buffer, int offset, int count) |
| | Read a block of bytes from stream.
|
| override IAsyncResult | BeginRead (byte[] buffer, int offset, int count, AsyncCallback callback, object state) |
| | Asynchronous reads are not supported a NotSupportedException is always thrown.
|
| override IAsyncResult | BeginWrite (byte[] buffer, int offset, int count, AsyncCallback callback, object state) |
| | Asynchronous writes arent supported, a NotSupportedException is always thrown.
|
| override void | Flush () |
| | Flushes the stream by calling Flush on the deflater and then on the underlying stream. This ensures that all bytes are flushed.
|
| override void | Close () |
| | Calls Finish and closes the underlying stream when IsStreamOwner is true.
|
| override void | WriteByte (byte value) |
| | Writes a single byte to the compressed output stream.
|
| override void | Write (byte[] buffer, int offset, int count) |
| | Writes bytes from an array to the compressed stream.
|
|
| void | EncryptBlock (byte[] buffer, int offset, int length) |
| | Encrypt a block of data.
|
| void | InitializePassword (string password) |
| | Initializes encryption keys based on given password .
|
| void | InitializeAESPassword (ZipEntry entry, string rawPassword, out byte[] salt, out byte[] pwdVerifier) |
| | Initializes encryption keys based on given password.
|
| void | Deflate () |
| | Deflates everything in the input buffers. This will call.
|
| bool | IsStreamOwner [get, set] |
| | Get/set flag indicating ownership of the underlying stream. When the flag is true Close will close the underlying stream also.
|
| bool | CanPatchEntries [get] |
| | Allows client to determine if an entry can be patched after its added.
|
| string | Password [get, set] |
| | Get/set the password used for encryption.
|
| override bool | CanRead [get] |
| | Gets value indicating stream can be read from.
|
| override bool | CanSeek [get] |
| | Gets a value indicating if seeking is supported for this stream This property always returns false.
|
| override bool | CanWrite [get] |
| | Get value indicating if this stream supports writing.
|
| override long | Length [get] |
| | Get current length of stream.
|
| override long | Position [get, set] |
| | Gets the current position within the stream.
|
This filter stream is used to compress a stream into a "GZIP" stream. The "GZIP" format is described in RFC 1952.
author of the original java version : John Leuner
This sample shows how to gzip a file
using System;
using System.IO;
class MainClass
{
public static void Main(string[] args)
{
using (FileStream fs =
File.OpenRead(args[0])) {
byte[] writeData = new byte[4096];
Streamutils.Copy(s, fs, writeData);
}
}
}
} <br>
Zwipe.Test.Tools.Entities.File File
Definition ExportsTest.cs:6
GZipOutputStream(Stream baseOutputStream)
Creates a GzipOutputStream with the default buffer size.
Definition GzipOutputStream.cs:102
Definition FileSystemScanner.cs:40
Definition GZIPConstants.cs:40