docs: def encode(cls, line):
          """
          Backslash escape line.value.
          """
          if not line.encoded:
              encoding = getattr(line, 'encoding_param', None)
              if encoding and encoding.upper() == cls.base64string:
                  if isinstance(line.value, bytes):
                      line.value = codecs.encode(line.value, "base64").decode("utf-8").replace('\n', '')
                  else:
                      line.value = codecs.encode(line.value.encode(encoding), "base64").decode("utf-8")
              else:
                  line.value = backslashEscape(line.value)
              line.encoded = True