466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
|
Output.Stream.Write (Encodings.Encode_Base64 (Data));
Output.Stream.Write ((0 => Encodings.Base64_Atom_End));
else
Output.Stream.Write ((0 => Encodings.Base64_Atom_Begin));
Output.Cursor := Output.Cursor + 1;
loop
Available := Output.Param.Width - Output.Cursor;
Chunk_Size := Count (Available) / 4 * 3;
if Available mod 4 /= 0 then
Output.Stream.Write ((0 => Encodings.Space));
Output.Cursor := Output.Cursor + 1;
end if;
if I + Chunk_Size in Data'Range then
Output.Stream.Write (Encodings.Encode_Base64
(Data (I .. I + Chunk_Size - 1)));
Newline (Output);
I := I + Chunk_Size;
else
Output.Stream.Write (Encodings.Encode_Base64
(Data (I .. Data'Last)));
|
|
|
|
|
>
|
|
|
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
|
Output.Stream.Write (Encodings.Encode_Base64 (Data));
Output.Stream.Write ((0 => Encodings.Base64_Atom_End));
else
Output.Stream.Write ((0 => Encodings.Base64_Atom_Begin));
Output.Cursor := Output.Cursor + 1;
loop
Available := Output.Param.Width + 1 - Output.Cursor;
Chunk_Size := Count'Max (1, Count (Available) / 4) * 3;
if Available mod 4 /= 0 and then I in Data'Range then
Output.Stream.Write
((1 .. Count (Available mod 4) => Encodings.Space));
Output.Cursor := Output.Cursor + (Available mod 4);
end if;
if I + Chunk_Size - 1 in Data'Range then
Output.Stream.Write (Encodings.Encode_Base64
(Data (I .. I + Chunk_Size - 1)));
Newline (Output);
I := I + Chunk_Size;
else
Output.Stream.Write (Encodings.Encode_Base64
(Data (I .. Data'Last)));
|
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
|
Output.Param.Hex_Casing));
Output.Stream.Write ((0 => Encodings.Hex_Atom_End));
else
Output.Stream.Write ((0 => Encodings.Hex_Atom_Begin));
Output.Cursor := Output.Cursor + 1;
loop
Available := Output.Param.Width - Output.Cursor;
Chunk_Size := Count (Available) / 2;
if Available mod 2 = 1 then
Output.Stream.Write ((0 => Encodings.Space));
Output.Cursor := Output.Cursor + 1;
end if;
if I + Chunk_Size in Data'Range then
Output.Stream.Write (Encodings.Encode_Hex
(Data (I .. I + Chunk_Size - 1),
Output.Param.Hex_Casing));
Newline (Output);
I := I + Chunk_Size;
else
Output.Stream.Write (Encodings.Encode_Hex
|
|
|
|
|
|
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
|
Output.Param.Hex_Casing));
Output.Stream.Write ((0 => Encodings.Hex_Atom_End));
else
Output.Stream.Write ((0 => Encodings.Hex_Atom_Begin));
Output.Cursor := Output.Cursor + 1;
loop
Available := Output.Param.Width + 1 - Output.Cursor;
Chunk_Size := Count'Max (1, Count (Available) / 2);
if Available mod 2 = 1 and then I in Data'Range then
Output.Stream.Write ((0 => Encodings.Space));
Output.Cursor := Output.Cursor + 1;
end if;
if I + Chunk_Size - 1 in Data'Range then
Output.Stream.Write (Encodings.Encode_Hex
(Data (I .. I + Chunk_Size - 1),
Output.Param.Hex_Casing));
Newline (Output);
I := I + Chunk_Size;
else
Output.Stream.Write (Encodings.Encode_Hex
|