This filter stream is used to decompress a "GZIP" format stream. The "GZIP" format is described baseInputStream RFC 1952.
More...
|
| | GZipInputStream (Stream baseInputStream) |
| | Creates a GZipInputStream with the default buffer size.
|
| | GZipInputStream (Stream baseInputStream, int size) |
| | Creates a GZIPInputStream with the specified buffer size.
|
| override int | Read (byte[] buffer, int offset, int count) |
| | Reads uncompressed data into an array of bytes.
|
| | InflaterInputStream (Stream baseInputStream) |
| | Create an InflaterInputStream with the default decompressor and a default buffer size of 4KB.
|
| | InflaterInputStream (Stream baseInputStream, Inflater inf) |
| | Create an InflaterInputStream with the specified decompressor and a default buffer size of 4KB.
|
| | InflaterInputStream (Stream baseInputStream, Inflater inflater, int bufferSize) |
| | Create an InflaterInputStream with the specified decompressor and the specified buffer size.
|
| long | Skip (long count) |
| | Skip specified number of bytes of uncompressed data.
|
| override void | Flush () |
| | Flushes the baseInputStream.
|
| override long | Seek (long offset, SeekOrigin origin) |
| | Sets the position within the current stream Always throws a NotSupportedException.
|
| override void | SetLength (long value) |
| | Set the length of the current stream Always throws a NotSupportedException.
|
| override void | Write (byte[] buffer, int offset, int count) |
| | Writes a sequence of bytes to stream and advances the current position This method always throws a NotSupportedException.
|
| override void | WriteByte (byte value) |
| | Writes one byte to the current stream and advances the current position Always throws a NotSupportedException.
|
| override IAsyncResult | BeginWrite (byte[] buffer, int offset, int count, AsyncCallback callback, object state) |
| | Entry point to begin an asynchronous write. Always throws a NotSupportedException.
|
| override void | Close () |
| | Closes the input stream. When IsStreamOwner is true the underlying stream is also closed.
|
| override int | Read (byte[] buffer, int offset, int count) |
| | Reads decompressed data into the provided buffer byte array.
|
|
| bool | readGZIPHeader |
| | Flag to indicate if we've read the GZIP header yet for the current member (block of compressed data). This is tracked per-block as the file is parsed.
|
|
| void | StopDecrypting () |
| | Clear any cryptographic state.
|
| void | Fill () |
| | Fills the buffer with more data to decompress.
|
| bool | IsStreamOwner [get, set] |
| | Get/set flag indicating ownership of underlying stream. When the flag is true Close will close the underlying stream also.
|
| virtual int | Available [get] |
| | Returns 0 once the end of the stream (EOF) has been reached. Otherwise returns 1.
|
| override bool | CanRead [get] |
| | Gets a value indicating whether the current stream supports reading.
|
| override bool | CanSeek [get] |
| | Gets a value of false indicating seeking is not supported for this stream.
|
| override bool | CanWrite [get] |
| | Gets a value of false indicating that this stream is not writeable.
|
| override long | Length [get] |
| | A value representing the length of the stream in bytes.
|
| override long | Position [get, set] |
| | The current position within the stream. Throws a NotSupportedException when attempting to set the position.
|
This filter stream is used to decompress a "GZIP" format stream. The "GZIP" format is described baseInputStream RFC 1952.
author of the original java version : John Leuner
This sample shows how to unzip a gzipped file
using System;
using System.IO;
class MainClass
{
public static void Main(string[] args)
{
using (FileStream outStream =
File.Create(Path.GetFileNameWithoutExtension(args[0]))) {
byte[] buffer = new byte[4096];
}
}
} <br>
Zwipe.Test.Tools.Entities.File File
Definition ExportsTest.cs:6
Provides simple Stream" utilities.
Definition StreamUtils.cs:45
static void Copy(Stream source, Stream destination, byte[] buffer)
Copy the contents of one Stream to another.
Definition StreamUtils.cs:102
Definition FileSystemScanner.cs:40
Definition GZIPConstants.cs:40
◆ GZipInputStream() [1/2]
| ICSharpCode.SharpZipLib.GZip.GZipInputStream.GZipInputStream |
( |
Stream | baseInputStream | ) |
|
Creates a GZipInputStream with the default buffer size.
- Parameters
-
| baseInputStream | The stream to read compressed data from (baseInputStream GZIP format) |
◆ GZipInputStream() [2/2]
| ICSharpCode.SharpZipLib.GZip.GZipInputStream.GZipInputStream |
( |
Stream | baseInputStream, |
|
|
int | size ) |
Creates a GZIPInputStream with the specified buffer size.
- Parameters
-
| baseInputStream | The stream to read compressed data from (baseInputStream GZIP format) |
| size | Size of the buffer to use |
◆ Read()
| override int ICSharpCode.SharpZipLib.GZip.GZipInputStream.Read |
( |
byte[] | buffer, |
|
|
int | offset, |
|
|
int | count ) |
Reads uncompressed data into an array of bytes.
- Parameters
-
| buffer | The buffer to read uncompressed data into |
| offset | The offset indicating where the data should be placed |
| count | The number of uncompressed bytes to be read |
- Returns
- Returns the number of bytes actually read.
◆ ReadFooter()
| void ICSharpCode.SharpZipLib.GZip.GZipInputStream.ReadFooter |
( |
| ) |
|
|
private |
◆ ReadHeader()
| bool ICSharpCode.SharpZipLib.GZip.GZipInputStream.ReadHeader |
( |
| ) |
|
|
private |
◆ crc
| Crc32 ICSharpCode.SharpZipLib.GZip.GZipInputStream.crc |
|
protected |
CRC-32 value for uncompressed data.
◆ readGZIPHeader
| bool ICSharpCode.SharpZipLib.GZip.GZipInputStream.readGZIPHeader |
|
private |
Flag to indicate if we've read the GZIP header yet for the current member (block of compressed data). This is tracked per-block as the file is parsed.
The documentation for this class was generated from the following file: