BlockTransformBase
Base class for all block transformations.
Definition
Namespace:Telerik.Windows.Zip
Assembly:Telerik.Windows.Zip.dll
Syntax:
public abstract class BlockTransformBase : IBlockTransform, IDisposable
Inheritance: objectBlockTransformBase
Implements:
Constructors
Initializes a new instance of the BlockTransformBase class.
protected BlockTransformBase()
Methods
Creates transformation header to be written into the output stream.
public virtual void CreateHeader(CompressionSettings compressionSettings = null)
Implements:
Releases the resources used by the current instance of the ZipArchive class.
public void Dispose()
Implements:
Releases the unmanaged resources used by the transform and optionally releases the managed resources.
protected abstract void Dispose(bool disposing)
Value which indicates whether both managed and unmanaged resources (true) on only unmanaged resources (false) should be released.
Initialize reading of the transformation footer.
public virtual void InitFooterReading(int compressedSize)
Implements:
Initialize reading of the transformation header.
public virtual void InitHeaderReading(CompressionSettings settings = null)
Implements:
Process transformation footer has been read.
public virtual void ProcessFooter()
Implements:
Process transformation header has been read.
public virtual void ProcessHeader()
Implements:
Transforms the specified region of the input byte array and copies the resulting transform to the specified region of the output byte array.
public abstract int TransformBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset)
The input for which to compute the transform.
inputOffsetintThe offset into the input byte array from which to begin using data.
inputCountintThe number of bytes in the input byte array to use as data.
outputBufferbyte[]The output to which to write the transform.
outputOffsetintThe offset into the output byte array from which to begin writing data.
Returns:The number of bytes written.
Implements:
Transforms the specified region of the specified byte array.
public abstract byte[] TransformFinalBlock(byte[] inputBuffer, int inputOffset, int inputCount, CancellationToken cancellationToken)
The input for which to compute the transform.
inputOffsetintThe offset into the byte array from which to begin using data.
inputCountintThe number of bytes in the byte array to use as data.
cancellationTokenCancellationTokenThe token to monitor for cancellation requests.
Returns:byte[]
The computed transform.
Implements:
Transforms the specified region of the specified byte array.
public abstract byte[] TransformFinalBlock(byte[] inputBuffer, int inputOffset, int inputCount)
The input for which to compute the transform.
inputOffsetintThe offset into the byte array from which to begin using data.
inputCountintThe number of bytes in the byte array to use as data.
Returns:byte[]
The computed transform.
Implements:
Validates parameters of the input buffer.
protected void ValidateInputBufferParameters(byte[] inputBuffer, int inputOffset, int inputCount, bool validateBlockSize, bool allowZeroCount)
The input for which to compute the transform.
inputOffsetintThe offset into the input byte array from which to begin using data.
inputCountintThe number of bytes in the input byte array to use as data.
validateBlockSizeboolIndicates whether buffer block size should be validated. Should be true for the TransformBlock and false for the TransformFinalBlock.
allowZeroCountboolIndicates whether count can be zero.
Validates parameters of the transform operation.
protected void ValidateParameters(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset, bool allowZeroCount)
The input for which to compute the transform.
inputOffsetintThe offset into the input byte array from which to begin using data.
inputCountintThe number of bytes in the input byte array to use as data.
outputBufferbyte[]The output to which to write the transform.
outputOffsetintThe offset into the output byte array from which to begin writing data.
allowZeroCountboolIndicates whether input count can be zero.
Properties
Gets a value indicating whether the current transform can be reused.
public abstract bool CanReuseTransform { get; }
true if the current transform can be reused; otherwise, false.
Implements:
Gets a value indicating whether multiple blocks can be transformed.
public abstract bool CanTransformMultipleBlocks { get; }
true if multiple blocks can be transformed; otherwise, false.
Implements:
Gets or sets value which indicates whether the transformation uses input buffer of the fixed size.
protected bool FixedInputBlockSize { get; set; }
Gets transformation footer (if required).
public TransformationFooter Footer { get; }
Implements:
Gets transformation header (if required).
public TransformationHeader Header { get; }
Implements:
Gets the input block size.
public abstract int InputBlockSize { get; }
The size of the input data blocks in bytes.
Implements:
Gets the output block size.
public abstract int OutputBlockSize { get; }
The size of the output data blocks in bytes.
Implements: