Class
BlockTransformBase

Base class for all block transformations.

Definition

Namespace:Telerik.Windows.Zip

Assembly:Telerik.Windows.Zip.dll

Syntax:

cs-api-definition
public abstract class BlockTransformBase : IBlockTransform, IDisposable

Inheritance: objectBlockTransformBase

Implements: IBlockTransformIDisposable

Constructors

BlockTransformBase()

Initializes a new instance of the BlockTransformBase class.

Declaration

cs-api-definition
protected BlockTransformBase()

Properties

CanReuseTransform

Gets a value indicating whether the current transform can be reused.

Declaration

cs-api-definition
public abstract bool CanReuseTransform { get; }

Property Value

bool

true if the current transform can be reused; otherwise, false.

Implements IBlockTransform.CanReuseTransform

CanTransformMultipleBlocks

Gets a value indicating whether multiple blocks can be transformed.

Declaration

cs-api-definition
public abstract bool CanTransformMultipleBlocks { get; }

Property Value

bool

true if multiple blocks can be transformed; otherwise, false.

Implements IBlockTransform.CanTransformMultipleBlocks

FixedInputBlockSize

Gets or sets value which indicates whether the transformation uses input buffer of the fixed size.

Declaration

cs-api-definition
protected bool FixedInputBlockSize { get; set; }

Property Value

bool

Gets transformation footer (if required).

Declaration

cs-api-definition
public TransformationFooter Footer { get; }

Property Value

TransformationFooter

Implements IBlockTransform.Footer

Header

Gets transformation header (if required).

Declaration

cs-api-definition
public TransformationHeader Header { get; }

Property Value

TransformationHeader

Implements IBlockTransform.Header

InputBlockSize

Gets the input block size.

Declaration

cs-api-definition
public abstract int InputBlockSize { get; }

Property Value

int

The size of the input data blocks in bytes.

Implements IBlockTransform.InputBlockSize

OutputBlockSize

Gets the output block size.

Declaration

cs-api-definition
public abstract int OutputBlockSize { get; }

Property Value

int

The size of the output data blocks in bytes.

Implements IBlockTransform.OutputBlockSize

Methods

CreateHeader(CompressionSettings)

Creates transformation header to be written into the output stream.

Declaration

cs-api-definition
public virtual void CreateHeader(CompressionSettings compressionSettings = null)

Parameters

compressionSettings

CompressionSettings

Implements IBlockTransform.CreateHeader(CompressionSettings)

Dispose()

Releases the resources used by the current instance of the ZipArchive class.

Declaration

cs-api-definition
public void Dispose()

Implements IDisposable.Dispose()

Dispose(bool)

Releases the unmanaged resources used by the transform and optionally releases the managed resources.

Declaration

cs-api-definition
protected abstract void Dispose(bool disposing)

Parameters

disposing

bool

Value which indicates whether both managed and unmanaged resources (true) on only unmanaged resources (false) should be released.

InitFooterReading(int)

Initialize reading of the transformation footer.

Declaration

cs-api-definition
public virtual void InitFooterReading(int compressedSize)

Parameters

compressedSize

int

Implements IBlockTransform.InitFooterReading(int)

InitHeaderReading(CompressionSettings)

Initialize reading of the transformation header.

Declaration

cs-api-definition
public virtual void InitHeaderReading(CompressionSettings settings = null)

Parameters

settings

CompressionSettings

Implements IBlockTransform.InitHeaderReading(CompressionSettings)

ProcessFooter()

Process transformation footer has been read.

Declaration

cs-api-definition
public virtual void ProcessFooter()

Implements IBlockTransform.ProcessFooter()

ProcessHeader()

Process transformation header has been read.

Declaration

cs-api-definition
public virtual void ProcessHeader()

Implements IBlockTransform.ProcessHeader()

TransformBlock(byte[], int, int, byte[], int)

Transforms the specified region of the input byte array and copies the resulting transform to the specified region of the output byte array.

Declaration

cs-api-definition
public abstract int TransformBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset)

Parameters

inputBuffer

byte[]

The input for which to compute the transform.

inputOffset

int

The offset into the input byte array from which to begin using data.

inputCount

int

The number of bytes in the input byte array to use as data.

outputBuffer

byte[]

The output to which to write the transform.

outputOffset

int

The offset into the output byte array from which to begin writing data.

Returns

int

The number of bytes written.

Implements IBlockTransform.TransformBlock(byte[], int, int, byte[], int)

TransformFinalBlock(byte[], int, int)

Transforms the specified region of the specified byte array.

Declaration

cs-api-definition
public abstract byte[] TransformFinalBlock(byte[] inputBuffer, int inputOffset, int inputCount)

Parameters

inputBuffer

byte[]

The input for which to compute the transform.

inputOffset

int

The offset into the byte array from which to begin using data.

inputCount

int

The number of bytes in the byte array to use as data.

Returns

byte[]

The computed transform.

Implements IBlockTransform.TransformFinalBlock(byte[], int, int)

TransformFinalBlock(byte[], int, int, CancellationToken)

Transforms the specified region of the specified byte array.

Declaration

cs-api-definition
public abstract byte[] TransformFinalBlock(byte[] inputBuffer, int inputOffset, int inputCount, CancellationToken cancellationToken)

Parameters

inputBuffer

byte[]

The input for which to compute the transform.

inputOffset

int

The offset into the byte array from which to begin using data.

inputCount

int

The number of bytes in the byte array to use as data.

cancellationToken

CancellationToken

The token to monitor for cancellation requests.

Returns

byte[]

The computed transform.

Implements IBlockTransform.TransformFinalBlock(byte[], int, int, CancellationToken)

ValidateInputBufferParameters(byte[], int, int, bool, bool)

Validates parameters of the input buffer.

Declaration

cs-api-definition
protected void ValidateInputBufferParameters(byte[] inputBuffer, int inputOffset, int inputCount, bool validateBlockSize, bool allowZeroCount)

Parameters

inputBuffer

byte[]

The input for which to compute the transform.

inputOffset

int

The offset into the input byte array from which to begin using data.

inputCount

int

The number of bytes in the input byte array to use as data.

validateBlockSize

bool

Indicates whether buffer block size should be validated. Should be true for the TransformBlock and false for the TransformFinalBlock.

allowZeroCount

bool

Indicates whether count can be zero.

ValidateParameters(byte[], int, int, byte[], int, bool)

Validates parameters of the transform operation.

Declaration

cs-api-definition
protected void ValidateParameters(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset, bool allowZeroCount)

Parameters

inputBuffer

byte[]

The input for which to compute the transform.

inputOffset

int

The offset into the input byte array from which to begin using data.

inputCount

int

The number of bytes in the input byte array to use as data.

outputBuffer

byte[]

The output to which to write the transform.

outputOffset

int

The offset into the output byte array from which to begin writing data.

allowZeroCount

bool

Indicates whether input count can be zero.