C# 클래스 SharpGIS.ZLib.ZlibCodec

Encoder and Decoder for ZLIB and DEFLATE (IETF RFC1950 and RFC1951).
This class compresses and decompresses data according to the Deflate algorithm and optionally, the ZLIB format, as documented in RFC 1950 - ZLIB and RFC 1951 - DEFLATE.
파일 보기 프로젝트 열기: sozialhelden/wheelmap-wp7 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
AvailableBytesIn int
AvailableBytesOut int
InputBuffer byte[]
Message System.String
NextIn int
NextOut int
OutputBuffer byte[]
TotalBytesIn long
TotalBytesOut long
WindowBits int

공개 메소드들

메소드 설명
EndInflate ( ) : int

Ends an inflation session.

Call this after successively calling Inflate(). This will cause all buffers to be flushed. After calling this you cannot call Inflate() without a intervening call to one of the InitializeInflate() overloads.

Inflate ( FlushType flush ) : int

Inflate the data in the InputBuffer, placing the result in the OutputBuffer.

You must have set InputBuffer and OutputBuffer, NextIn and NextOut, and AvailableBytesIn and AvailableBytesOut before calling this method.

InitializeInflate ( ) : int

Initialize the inflation state.

It is not necessary to call this before using the ZlibCodec to inflate data; It is implicitly called when you call the constructor.

InitializeInflate ( bool expectRfc1950Header ) : int

Initialize the inflation state with an explicit flag to govern the handling of RFC1950 header bytes.

By default, the ZLIB header defined in RFC 1950 is expected. If you want to read a zlib stream you should specify true for expectRfc1950Header. If you have a deflate stream, you will want to specify false. It is only necessary to invoke this initializer explicitly if you want to specify false.

InitializeInflate ( int windowBits ) : int

Initialize the ZlibCodec for inflation, with the specified number of window bits.

InitializeInflate ( int windowBits, bool expectRfc1950Header ) : int

Initialize the inflation state with an explicit flag to govern the handling of RFC1950 header bytes.

If you want to read a zlib stream you should specify true for expectRfc1950Header. In this case, the library will expect to find a ZLIB header, as defined in RFC 1950, in the compressed stream. If you will be reading a DEFLATE or GZIP stream, which does not have such a header, you will want to specify false.

SetDictionary ( byte dictionary ) : int

Set the dictionary to be used for either Inflation or Deflation.

SyncInflate ( ) : int

I don't know what this does!

ZlibCodec ( ) : System

Create a ZlibCodec that decompresses.

메소드 상세

EndInflate() 공개 메소드

Ends an inflation session.
Call this after successively calling Inflate(). This will cause all buffers to be flushed. After calling this you cannot call Inflate() without a intervening call to one of the InitializeInflate() overloads.
public EndInflate ( ) : int
리턴 int

Inflate() 공개 메소드

Inflate the data in the InputBuffer, placing the result in the OutputBuffer.
You must have set InputBuffer and OutputBuffer, NextIn and NextOut, and AvailableBytesIn and AvailableBytesOut before calling this method.
public Inflate ( FlushType flush ) : int
flush FlushType The flush to use when inflating.
리턴 int

InitializeInflate() 공개 메소드

Initialize the inflation state.
It is not necessary to call this before using the ZlibCodec to inflate data; It is implicitly called when you call the constructor.
public InitializeInflate ( ) : int
리턴 int

InitializeInflate() 공개 메소드

Initialize the inflation state with an explicit flag to govern the handling of RFC1950 header bytes.
By default, the ZLIB header defined in RFC 1950 is expected. If you want to read a zlib stream you should specify true for expectRfc1950Header. If you have a deflate stream, you will want to specify false. It is only necessary to invoke this initializer explicitly if you want to specify false.
public InitializeInflate ( bool expectRfc1950Header ) : int
expectRfc1950Header bool whether to expect an RFC1950 header byte /// pair when reading the stream of data to be inflated.
리턴 int

InitializeInflate() 공개 메소드

Initialize the ZlibCodec for inflation, with the specified number of window bits.
public InitializeInflate ( int windowBits ) : int
windowBits int The number of window bits to use. If you need to ask what that is, /// then you shouldn't be calling this initializer.
리턴 int

InitializeInflate() 공개 메소드

Initialize the inflation state with an explicit flag to govern the handling of RFC1950 header bytes.
If you want to read a zlib stream you should specify true for expectRfc1950Header. In this case, the library will expect to find a ZLIB header, as defined in RFC 1950, in the compressed stream. If you will be reading a DEFLATE or GZIP stream, which does not have such a header, you will want to specify false.
public InitializeInflate ( int windowBits, bool expectRfc1950Header ) : int
windowBits int The number of window bits to use. If you need to ask what that is, /// then you shouldn't be calling this initializer.
expectRfc1950Header bool whether to expect an RFC1950 header byte pair when reading /// the stream of data to be inflated.
리턴 int

SetDictionary() 공개 메소드

Set the dictionary to be used for either Inflation or Deflation.
public SetDictionary ( byte dictionary ) : int
dictionary byte The dictionary bytes to use.
리턴 int

SyncInflate() 공개 메소드

I don't know what this does!
public SyncInflate ( ) : int
리턴 int

ZlibCodec() 공개 메소드

Create a ZlibCodec that decompresses.
public ZlibCodec ( ) : System
리턴 System

프로퍼티 상세

AvailableBytesIn 공개적으로 프로퍼티

The number of bytes available in the InputBuffer, starting at NextIn.
Generally you should set this to InputBuffer.Length before the first Inflate() or Deflate() call. The class will update this number as calls to Inflate/Deflate are made.
public int AvailableBytesIn
리턴 int

AvailableBytesOut 공개적으로 프로퍼티

The number of bytes available in the OutputBuffer, starting at NextOut.
Generally you should set this to OutputBuffer.Length before the first Inflate() or Deflate() call. The class will update this number as calls to Inflate/Deflate are made.
public int AvailableBytesOut
리턴 int

InputBuffer 공개적으로 프로퍼티

The buffer from which data is taken.
public byte[] InputBuffer
리턴 byte[]

Message 공개적으로 프로퍼티

used for diagnostics, when something goes wrong!
public String,System Message
리턴 System.String

NextIn 공개적으로 프로퍼티

An index into the InputBuffer array, indicating where to start reading.
public int NextIn
리턴 int

NextOut 공개적으로 프로퍼티

An index into the OutputBuffer array, indicating where to start writing.
public int NextOut
리턴 int

OutputBuffer 공개적으로 프로퍼티

Buffer to store output data.
public byte[] OutputBuffer
리턴 byte[]

TotalBytesIn 공개적으로 프로퍼티

Total number of bytes read so far, through all calls to Inflate()/Deflate().
public long TotalBytesIn
리턴 long

TotalBytesOut 공개적으로 프로퍼티

Total number of bytes written to the output so far, through all calls to Inflate()/Deflate().
public long TotalBytesOut
리턴 long

WindowBits 공개적으로 프로퍼티

The number of Window Bits to use.
This gauges the size of the sliding window, and hence the compression effectiveness as well as memory consumption. It's best to just leave this setting alone if you don't know what it is. The maximum value is 15 bits, which implies a 32k window.
public int WindowBits
리턴 int