
There are many protocols, like classic UNIX uuencode,
which are used to transmit binary files
over transmission mediums that do not support other than
simple ASCII data. The epoch of physical lines of such sort is
in past but file attachments in most popular mail systems still
follow old regulations.
    
Encoded data are transmitted as a sequence of one or more "sections".
They may be stored or sent as independent documents.
Every section contains some range of original document@s data.
They may be decoded one after another, and original
document may be composed by concatenation of decoded fragments.
If the document is small (or if there@s no limit on the size of message),
it may be sent as single section.
    
Every section has some header and footer and a set of
lines with data between them. Headers and especially footers are
usually optional and may vary from system to system whereas
data lines are described by standards. Data lines of any two
consequent sections may be concatenated together, if needed, to
create longer section.
    
uuencode creates a vector of strings, where
every string contains some number of data lines, without headers or
footers. A PL/SQL stored procedure may be used to create some output
stream(s) and put there sections of appropriate format with
data lines from vector.
Every item of the created vector will contain up to
maxlines lines of data,
usually 60 to 80 bytes per line; maxlines
may vary from 10 to 120000 so section may be 0.8Kb to 10Mb long
depending on your choice.
Last section may be shorter than other, if only partially filled.
10Mb limit may be bypassed by sending of sections one after another
without intermediate footers or headers, but please keep in
mind that you cannot concatenate two strings in memory if
the sum of their lengths exceeds system-wide 10Mb.
    
RFC 2045,
(N. Borenstein, N. Freed.
MIME (Multipurpose Internet Mail Extensions) Part One:
The Format of Internet Message Bodies),
contains detailed description of most important encodings used by mail
systems.
Older RFC 1521 is now obsoleted.
    
Currently, eight conventions are used for mail attachments.
In Virtuoso, they are enumerated by integer IDs.
    