internal/encoder/bit
Encode bit strings according to RFC 2045.
See the following link for reference:
Values
pub fn encode_string(
encode string: String,
in bits: Int,
with mode: encoding.EncodingMode,
maximum_size maximum_size: Int,
) -> Result(List(String), encoding.EncoderError)
Bit encode a string with the required number of bits, using the specified encoding mode and taking into account the maximum allowed line size.
pub fn estimate_encoded_size(
of string: String,
in bits: Int,
with mode: encoding.EncodingMode,
maximum_size maximum_size: Int,
) -> Result(Int, encoding.EncoderError)
Estimates the `bits’ bit encoded size of a string in bytes, taking maximum size of a line into account.