C# Класс ICSharpCode.SharpZipLib.Zip.Compression.Streams.DeflaterOutputStream

Наследование: Stream
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
AESAuthCode byte[]
baseOutputStream_ Stream
deflater_ ICSharpCode.SharpZipLib.Zip.Compression.Deflater

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

Метод Описание
DeflaterOutputStream ( Stream baseOutputStream ) : System

Creates a new DeflaterOutputStream with a default Deflater and default buffer size.

DeflaterOutputStream ( Stream baseOutputStream, Deflater deflater ) : System

Creates a new DeflaterOutputStream with the given Deflater and default buffer size.

DeflaterOutputStream ( Stream baseOutputStream, Deflater deflater, int bufferSize ) : System

Creates a new DeflaterOutputStream with the given Deflater and buffer size.

Finish ( ) : void

Finishes the stream by calling finish() on the deflater.

Flush ( ) : void

Flushes the stream by calling Flush on the deflater and then on the underlying stream. This ensures that all bytes are flushed.

Read ( byte buffer, int offset, int count ) : int

Read a block of bytes from stream

ReadByte ( ) : int

Read a byte from stream advancing position by one

Seek ( long offset, SeekOrigin origin ) : long

Sets the current position of this stream to the given value. Not supported by this class!

SetLength ( long value ) : void

Sets the length of this stream to the given value. Not supported by this class!

Write ( byte buffer, int offset, int count ) : void

Writes bytes from an array to the compressed stream.

WriteByte ( byte value ) : void

Writes a single byte to the compressed output stream.

Защищенные методы

Метод Описание
Deflate ( ) : void

Deflates everything in the input buffers. This will call def.deflate() until all bytes from the input buffers are processed.

Dispose ( bool disposing ) : void

Calls Finish and closes the underlying stream when is true.

EncryptBlock ( byte buffer, int offset, int length ) : void

Encrypt a block of data

InitializeAESPassword ( ZipEntry entry, string rawPassword, byte &salt, byte &pwdVerifier ) : void

Initializes encryption keys based on given password.

InitializePassword ( string password ) : void

Initializes encryption keys based on given password.

Приватные методы

Метод Описание
GetAuthCodeIfAES ( ) : void

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

Deflate() защищенный Метод

Deflates everything in the input buffers. This will call def.deflate() until all bytes from the input buffers are processed.
protected Deflate ( ) : void
Результат void

DeflaterOutputStream() публичный Метод

Creates a new DeflaterOutputStream with a default Deflater and default buffer size.
public DeflaterOutputStream ( Stream baseOutputStream ) : System
baseOutputStream Stream /// the output stream where deflated output should be written. ///
Результат System

DeflaterOutputStream() публичный Метод

Creates a new DeflaterOutputStream with the given Deflater and default buffer size.
public DeflaterOutputStream ( Stream baseOutputStream, Deflater deflater ) : System
baseOutputStream Stream /// the output stream where deflated output should be written. ///
deflater ICSharpCode.SharpZipLib.Zip.Compression.Deflater /// the underlying deflater. ///
Результат System

DeflaterOutputStream() публичный Метод

Creates a new DeflaterOutputStream with the given Deflater and buffer size.
/// bufsize is less than or equal to zero. /// /// baseOutputStream does not support writing /// /// deflater instance is null ///
public DeflaterOutputStream ( Stream baseOutputStream, Deflater deflater, int bufferSize ) : System
baseOutputStream Stream /// The output stream where deflated output is written. ///
deflater ICSharpCode.SharpZipLib.Zip.Compression.Deflater /// The underlying deflater to use ///
bufferSize int /// The buffer size in bytes to use when deflating (minimum value 512) ///
Результат System

Dispose() защищенный Метод

Calls Finish and closes the underlying stream when is true.
protected Dispose ( bool disposing ) : void
disposing bool
Результат void

EncryptBlock() защищенный Метод

Encrypt a block of data
protected EncryptBlock ( byte buffer, int offset, int length ) : void
buffer byte /// Data to encrypt. NOTE the original contents of the buffer are lost ///
offset int /// Offset of first byte in buffer to encrypt ///
length int /// Number of bytes in buffer to encrypt ///
Результат void

Finish() публичный Метод

Finishes the stream by calling finish() on the deflater.
/// Not all input is deflated ///
public Finish ( ) : void
Результат void

Flush() публичный Метод

Flushes the stream by calling Flush on the deflater and then on the underlying stream. This ensures that all bytes are flushed.
public Flush ( ) : void
Результат void

InitializeAESPassword() защищенный Метод

Initializes encryption keys based on given password.
protected InitializeAESPassword ( ZipEntry entry, string rawPassword, byte &salt, byte &pwdVerifier ) : void
entry ICSharpCode.SharpZipLib.Zip.ZipEntry
rawPassword string
salt byte
pwdVerifier byte
Результат void

InitializePassword() защищенный Метод

Initializes encryption keys based on given password.
protected InitializePassword ( string password ) : void
password string The password.
Результат void

Read() публичный Метод

Read a block of bytes from stream
Any access
public Read ( byte buffer, int offset, int count ) : int
buffer byte The buffer to store read data in.
offset int The offset to start storing at.
count int The maximum number of bytes to read.
Результат int

ReadByte() публичный Метод

Read a byte from stream advancing position by one
Any access
public ReadByte ( ) : int
Результат int

Seek() публичный Метод

Sets the current position of this stream to the given value. Not supported by this class!
Any access
public Seek ( long offset, SeekOrigin origin ) : long
offset long The offset relative to the to seek.
origin SeekOrigin The to seek from.
Результат long

SetLength() публичный Метод

Sets the length of this stream to the given value. Not supported by this class!
Any access
public SetLength ( long value ) : void
value long The new stream length.
Результат void

Write() публичный Метод

Writes bytes from an array to the compressed stream.
public Write ( byte buffer, int offset, int count ) : void
buffer byte /// The byte array ///
offset int /// The offset into the byte array where to start. ///
count int /// The number of bytes to write. ///
Результат void

WriteByte() публичный Метод

Writes a single byte to the compressed output stream.
public WriteByte ( byte value ) : void
value byte /// The byte value. ///
Результат void

Описание свойств

AESAuthCode защищенное свойство

Returns the 10 byte AUTH CODE to be appended immediately following the AES data stream.
protected byte[] AESAuthCode
Результат byte[]

baseOutputStream_ защищенное свойство

Base stream the deflater depends on.
protected Stream baseOutputStream_
Результат Stream

deflater_ защищенное свойство

The deflater which is used to deflate the stream.
protected Deflater,ICSharpCode.SharpZipLib.Zip.Compression deflater_
Результат ICSharpCode.SharpZipLib.Zip.Compression.Deflater