Show / Hide Table of Contents

GetEncodedSize Method

GetEncodedSize(int)

Gets the number of characters needed to encode the data.

C#
public static int GetEncodedSize(int lengthInBytes)

Parameters

Type Name Description
int lengthInBytes

The length of the data to encode.

Returns

int

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.

In this article
Back to top Generated by DocFX