C# Класс ESRI.ArcGIS.Client.Toolkit.DataSources.Kml.Zip.ZlibCodec

Encoder and Decoder for ZLIB (IETF RFC1950 and RFC1951).
This class compresses and decompresses data according to the Deflate algorithm documented in RFC1950 and RFC1951.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
AvailableBytesIn int
AvailableBytesOut int
InputBuffer byte[]
Message System.String
NextIn int
NextOut int
OutputBuffer byte[]
TotalBytesIn long
TotalBytesOut long

Открытые методы

Метод Описание
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 ( int f ) : 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 RFC1950 header 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. If you have a deflate stream, 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.

If you use this default constructor, you will later have to explicitly call InitializeInflate() or InitializeDeflate() before using the ZlibCodec to compress or decompress.

Описание методов

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 ( int f ) : int
f int I think you want to set this to Z_NO_FLUSH.
Результат 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 RFC1950 header 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. If you have a deflate stream, 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.
If you use this default constructor, you will later have to explicitly call InitializeInflate() or InitializeDeflate() before using the ZlibCodec to compress or decompress.
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