The MSDN states about TransformBlock:
public int TransformBlock( byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset )Return Value: The number of bytes written.
I'm assuming the output buffer is of sufficient size. Typically, the input buffer is used as output buffer, both offset 0, so this is not an issue.
Is there any condition that could cause the return value to be not equal to the inputCount?