# File lib/mail/encodings/quoted_printable.rb, line 11
11: def self.can_encode?(str)
12: EightBit.can_encode? str
13: end
# File lib/mail/encodings/quoted_printable.rb, line 24
24: def self.cost(str)
25: # These bytes probably do not need encoding
26: c = str.count("\x9\\xA\\xD\\x20-\x3C\x3E-\x7E")
27: # Everything else turns into =XX where XX is a
28: # two digit hex number (taking 3 bytes)
29: total = (str.bytesize - c)*3 + c
30: total.to_f/str.bytesize
31: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.