156 {
157 three2four _3to4;
158 int line_octets = 0;
159
160 while(_First != _Last)
161 {
162 _3to4.zero();
163
164
165 _3to4.set_0(*_First);
166 _First++;
167
168 if(_First == _Last)
169 {
170 *_To = _Tr::to_char_type(_base64Chars[_3to4.b64_0()]); ++_To;
171 *_To = _Tr::to_char_type(_base64Chars[_3to4.b64_1()]); ++_To;
172 *_To = _Tr::to_char_type('='); ++_To;
173 *_To = _Tr::to_char_type('='); ++_To;
174 goto __end;
175 }
176
177 _3to4.set_1(*_First);
178 _First++;
179
180 if(_First == _Last)
181 {
182 *_To = _Tr::to_char_type(_base64Chars[_3to4.b64_0()]); ++_To;
183 *_To = _Tr::to_char_type(_base64Chars[_3to4.b64_1()]); ++_To;
184 *_To = _Tr::to_char_type(_base64Chars[_3to4.b64_2()]); ++_To;
185 *_To = _Tr::to_char_type('='); ++_To;
186 goto __end;
187 }
188
189 _3to4.set_2(*_First);
190 _First++;
191
192 *_To = _Tr::to_char_type(_base64Chars[_3to4.b64_0()]); ++_To;
193 *_To = _Tr::to_char_type(_base64Chars[_3to4.b64_1()]); ++_To;
194 *_To = _Tr::to_char_type(_base64Chars[_3to4.b64_2()]); ++_To;
195 *_To = _Tr::to_char_type(_base64Chars[_3to4.b64_3()]); ++_To;
196
197 if(line_octets == 17)
198 {
199
200 *_To = '\n'; ++_To;
201 line_octets = 0;
202 }
203 else
204 ++line_octets;
205 }
206
207 __end: ;
208
209 return (_First);
210
211 }