Companion

Functions

Link copied to clipboard
@JvmStatic
fun calculateMaxEncodeEmit(emitSize: Int, insertionInterval: Int): Int

Calculates and returns the maximum character emission size, given some sort of emitSize and desire to insert characters every insertionInterval. The way things are calculated are based on how lineBreakInterval operates, whereby if insertionInterval encoded characters have been output, the next encoded character output will be preceded with some arbitrary character (such as a hyphen for Base32.Crockford, which uses this function to calculate its final maxEncodeEmit value passed to the Config constructor).

Link copied to clipboard
@JvmStatic
fun outSizeExceedsMaxEncodingSizeException(inputSize: Number, maxSize: Number): EncodingSizeException

Helper for generating an EncodingSizeException when the pre-calculated encoded/decoded output size exceeds the maximum for the given encoding/decoding specification.