class Mail::Encodings::Base64
per input byte.
Base64 encoding handles binary content at the cost of 4 output bytes
def self.can_encode?(enc)
def self.can_encode?(enc) true end
def self.compatible_input?(str)
Ruby Base64 inserts newlines automatically, so it doesn't exceed
def self.compatible_input?(str) true end
def self.cost(str)
def self.cost(str) 4.0 / 3 end
def self.decode(str)
def self.decode(str) Utilities.decode_base64(str) end
def self.encode(str)
def self.encode(str) ::Mail::Utilities.binary_unsafe_to_crlf(Utilities.encode_base64(str)) end