Swift_Encoder_QpEncoder::_encodeByteSequence PHP Method

_encodeByteSequence() protected method

Encode the given byte array into a verbatim QP form.
protected _encodeByteSequence ( array $bytes, integer &$size ) : string
$bytes array
$size integer
return string
    protected function _encodeByteSequence(array $bytes, &$size)
    {
        $ret = '';
        $size = 0;
        foreach ($bytes as $b) {
            if (isset($this->_safeMap[$b])) {
                $ret .= $this->_safeMap[$b];
                ++$size;
            } else {
                $ret .= self::$_qpMap[$b];
                $size += 3;
            }
        }
        return $ret;
    }