FIGURE 19 is an expansion of step 1810
which focuses on management of an original data file 0220 while
fragmenting. FIGURE 19 comprises steps 1910 through 1990.
Step 1910 determines whether sixteen or
more bytes exist in the "latest use" original data buffer 1612. Latest use
is determined by the identifier 1641 in the latest fragment guide 1640. If
there are sixteen or more bytes in that original data buffer 1612, then
input status 1810 is okay for this iteration through the loop comprising
FIGURE 18; control is passed to step 1820 in FIGURE 18.
If in step 1910 it is determined that
there are fewer than sixteen bytes in the original data buffer 1612, every
possible fragment 1620 size cannot be accommodated therein. The first
option in this case is to replenish the original data buffer 1612. Step
1920, replenishing the original data buffer 1612, can be carried out only
if bytes remain in the original data file 0220 that have not yet been read
into the original data buffer 1612. If that file is already depleted, skip
to step 1930.
If unread bytes remain, step 1920
starts by positioning backward in the original data file 0220 roughly 2,048
bytes earlier than the point at which data was brought in from this file on
the previous reading. To be precise, the position is 2,048 bytes back, then
the number of unprocessed bytes still in the original data buffer 1612
forward. For example, if there are still 13 unprocessed bytes in the
original data buffer 1612, the correct positioning point is 2,035 (2,048
minus 13) bytes prior to the point in the original data file 0220 from
which content was read the last time from this file. Then 2,048 bytes are
read. The 13 residual bytes in the example now appear as the last 13 of the
new group of bytes in the original data buffer 1612. On the last reading
from the beginning of the original data file 0220, there is typically not
2,048 bytes not yet processed. Positioning in this special case is to the
beginning of the original data file 0220. The number of bytes is adjusted
to ensure that exactly enough bytes were taken in to handle all the
as-yet-unprocessed bytes of the original data file 0220. Also in the
special case of reading from the beginning of the file, a flag is set to
indicate that content of this original data file 0220 has been
depleted.
If replenishing the original data
buffer 1612 is successful in step 1920, processing returns to step
1820.