encodeOutMaxSize

fun encodeOutMaxSize(unEncodedSize: Long): Long(source)

Pre-calculates and returns the maximum size of the output, after encoding would occur, based off the Config options set for the implementation. Most implementations, such as Base16, Base32, and Base64, are able to return an exact size whereby no post-encoding resize is necessary, while others, such as UTF-8 byte to text transformations, return a maximum and may require a post-encoding resize.

Will always return a value greater than or equal to 0L.

Parameters

unEncodedSize

The size of the data which is to be encoded.

Throws

If unEncodedSize is negative, or the calculated size exceeds Long.MAX_VALUE.


fun encodeOutMaxSize(unEncodedSize: Long, lineBreakInterval: Byte): Long(source)

Pre-calculates and returns the maximum size of the output, after encoding would occur, based off the Config options set for the implementation. Most implementations, such as Base16, Base32, and Base64, are able to return an exact size whereby no post-encoding resize is necessary, while others, such as UTF-8 byte to text transformations, return a maximum and may require a post-encoding resize.

Will always return a value greater than or equal to 0L.

Parameters

unEncodedSize

The size of the data which is to be encoded.

lineBreakInterval

The interval at which new line characters are to be inserted.

Throws

If unEncodedSize is negative, or the calculated size exceeds Long.MAX_VALUE.


inline fun encodeOutMaxSize(unEncodedSize: Int): Int(source)

Pre-calculates and returns the maximum size of the output, after encoding would occur, based off the Config options set for the implementation. Most implementations, such as Base16, Base32, and Base64, are able to return an exact size whereby no post-encoding resize is necessary, while others, such as UTF-8 byte to text transformations, return a maximum and may require a post-encoding resize.

Will always return a value greater than or equal to 0.

Parameters

unEncodedSize

The size of the data which is to be encoded.

Throws

If unEncodedSize is negative, or the calculated size exceeds Int.MAX_VALUE.


fun encodeOutMaxSize(unEncodedSize: Int, lineBreakInterval: Byte): Int(source)

Pre-calculates and returns the maximum size of the output, after encoding would occur, based off the Config options set for the implementation. Most implementations, such as Base16, Base32, and Base64, are able to return an exact size whereby no post-encoding resize is necessary, while others, such as UTF-8 byte to text transformations, return a maximum and may require a post-encoding resize.

Will always return a value greater than or equal to 0.

Parameters

unEncodedSize

The size of the data which is to be encoded.

lineBreakInterval

The interval at which new line characters are to be inserted.

Throws

If unEncodedSize is negative, or the calculated size exceeds Int.MAX_VALUE.