Skip to content

convertlib release

convertlib 3.8.0

  • New codecs, each with to<Name>, from<Name>, and tryFrom<Name>:
    • Quoted-printable (RFC 2045): QuotedPrintableCodec with standard, binary (escapes CRLF), and header (RFC 2047 "Q"). Also toQuotedPrintableBytes. #17
    • UTF-16 and UTF-32: UTF16Codec and UTF32Codec with bigEndian, littleEndian, and standard (writes and reads a byte order mark). The const constructor also takes allowMalformed (malformed input becomes U+FFFD).
    • IMAP modified UTF-7 (RFC 3501): ImapUtf7Codec with standard and lenient.
    • Multibase: the Multibase enum covers the multibase table except proquint and base256emoji; Multibase.of detects the prefix.
  • Add the line-wrapped Base64Codec.mime (RFC 2045, 76 + CRLF), Base64Codec.pem (RFC 7468, 64 + LF), and Base64Codec.wrapped. Their decoders skip every character outside the alphabet, - and _ included.
  • Support chunked conversion (bind) on all encoders and decoders except Base-36, Base-58, Base-62, and Base-85 ipv6.
  • Speed up fromBigInt (6-11x on the VM, up to 2x on the web) and fromUtf8 of short ASCII text (17% at 32 bytes).
  • Streaming Base-8 holds its input as bytes, using about 7x less memory (936 MB -> 128 MB peak for a 32 MB stream), and runs 6x faster.
  • UTF16Encoder.encode writes into an exact-size buffer instead of a 2x one trimmed by a copy.
  • ByteCollector: add multibase([base]), utf16() and utf32(), and a codec: parameter on base32() and base64() for the other alphabets (Crockford, z-base-32, geohash, bcrypt, MIME, ...).

All posts·RSS feed