GetEncodedSize Method
GetEncodedSize(Int32)
Gets the number of characters needed to encode the data.
C#
public static int GetEncodedSize(int lengthInBytes)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | lengthInBytes | The length of the data to encode. |
Returns
System.Int32
The number of characters needed.
Remarks
The other encoding classes don't have the Get*Size methods. However, base-32 encoding represents five bits per character, and padding has to be accounted for, so it's a complex enough of an operation to merit a helper.