New to Telerik Document ProcessingStart a free 30-day trial

Base class for all block transformations.

Definition

Namespace:Telerik.Windows.Zip

Assembly:Telerik.Windows.Zip.dll

Syntax:

C#
public abstract class BlockTransformBase : IBlockTransform, IDisposable

Inheritance: objectBlockTransformBase

Implements: IBlockTransformIDisposable

Constructors

Initializes a new instance of the BlockTransformBase class.

C#
protected BlockTransformBase()

Methods

Creates transformation header to be written into the output stream.

C#
public virtual void CreateHeader(CompressionSettings compressionSettings = null)
Parameters:compressionSettingsCompressionSettings

Implements: IBlockTransform.CreateHeader(CompressionSettings)

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

C#
public void Dispose()

Implements: IDisposable.Dispose()

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

C#
protected abstract void Dispose(bool disposing)
Parameters:disposingbool

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

Initialize reading of the transformation footer.

C#
public virtual void InitFooterReading(int compressedSize)
Parameters:compressedSizeint

Implements: IBlockTransform.InitFooterReading(int)

Initialize reading of the transformation header.

C#
public virtual void InitHeaderReading(CompressionSettings settings = null)
Parameters:settingsCompressionSettings

Implements: IBlockTransform.InitHeaderReading(CompressionSettings)

Process transformation footer has been read.

C#
public virtual void ProcessFooter()

Implements: IBlockTransform.ProcessFooter()

Process transformation header has been read.

C#
public virtual void ProcessHeader()

Implements: IBlockTransform.ProcessHeader()

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

C#
public abstract int TransformBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset)
Parameters:inputBufferbyte[]

The input for which to compute the transform.

inputOffsetint

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

inputCountint

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

outputBufferbyte[]

The output to which to write the transform.

outputOffsetint

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)

Transforms the specified region of the specified byte array.

C#
public abstract byte[] TransformFinalBlock(byte[] inputBuffer, int inputOffset, int inputCount, CancellationToken cancellationToken)
Parameters:inputBufferbyte[]

The input for which to compute the transform.

inputOffsetint

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

inputCountint

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

cancellationTokenCancellationToken

The token to monitor for cancellation requests.

Returns:

byte[]

The computed transform.

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

Transforms the specified region of the specified byte array.

C#
public abstract byte[] TransformFinalBlock(byte[] inputBuffer, int inputOffset, int inputCount)
Parameters:inputBufferbyte[]

The input for which to compute the transform.

inputOffsetint

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

inputCountint

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

Returns:

byte[]

The computed transform.

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

Validates parameters of the input buffer.

C#
protected void ValidateInputBufferParameters(byte[] inputBuffer, int inputOffset, int inputCount, bool validateBlockSize, bool allowZeroCount)
Parameters:inputBufferbyte[]

The input for which to compute the transform.

inputOffsetint

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

inputCountint

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

validateBlockSizebool

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

allowZeroCountbool

Indicates whether count can be zero.

Validates parameters of the transform operation.

C#
protected void ValidateParameters(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset, bool allowZeroCount)
Parameters:inputBufferbyte[]

The input for which to compute the transform.

inputOffsetint

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

inputCountint

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

outputBufferbyte[]

The output to which to write the transform.

outputOffsetint

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

allowZeroCountbool

Indicates whether input count can be zero.

Properties

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

C#
public abstract bool CanReuseTransform { get; }
Property Value:

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

Implements: IBlockTransform.CanReuseTransform

Gets a value indicating whether multiple blocks can be transformed.

C#
public abstract bool CanTransformMultipleBlocks { get; }
Property Value:

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

Implements: IBlockTransform.CanTransformMultipleBlocks

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

C#
protected bool FixedInputBlockSize { get; set; }

Gets transformation footer (if required).

C#
public TransformationFooter Footer { get; }

Implements: IBlockTransform.Footer

Gets transformation header (if required).

C#
public TransformationHeader Header { get; }

Implements: IBlockTransform.Header

Gets the input block size.

C#
public abstract int InputBlockSize { get; }
Property Value:

The size of the input data blocks in bytes.

Implements: IBlockTransform.InputBlockSize

Gets the output block size.

C#
public abstract int OutputBlockSize { get; }
Property Value:

The size of the output data blocks in bytes.

Implements: IBlockTransform.OutputBlockSize