FIGURE 21 expands upon step 1770,
building a reconstitution file 0270. This is reached only after all
processing within FIGURES 18, 19, and 20 has been exhausted. The objective
at this point is to create a reconstitution file 0270 containing all
information needed to retrieve the original data files 0220 in the future.
This reconstitution file 0270 will be disguised and encrypted so that it
can be used only by the computer that created it.
Step 2110 is to create the
reconstitution header 1250. The structure in FIGURE 13 is sufficient to
guide construction of the header. The first portion of "BuildReconFile.cpp"
in the appendix illustrates a straight forward implementation of this
step.
Step 2120 is to create the
reconstitution main body 1260. All components for the body are described in
FIGURE 14. Their content is in RAM in final form, so they are simply
appended as the next part of the reconstitution file 0270. Again,
"BuildReconFile.cpp" provides a useful illustration.
Step 2130 lays the groundwork to cycle
through all action codes in reverse order. During fragmentation 1740, all
actions were recorded in a temporary file 1690 in fixed width format -- one
byte action code followed by the trailer in four byte form. These five byte
segments must be read in reverse order. Since the full size is known, a
buffer can be allocated dynamically. The entire temporary file is read into
this buffer. A pointer is set to the end of this buffer
Step 2140 involves reading the action
codes with their trailers in reverse order, copying the code, and
compressing integers or otherwise processing the trailer in a way that
depends on the particular action code. The result is appended, one action
code at a time, onto the end of the reconstitution file 0270. The totality
of these action codes with their processed and/or compressed trailers
constitute the reconstitution plan 1270. Specific processing of the action
codes follows.
Step 2141 applies to action codes 01
and 91 (1501 and 1591). The four byte trailer, consisting of two 16 bit
offsets, is copied without change.
Step 2142 applies to action code 02
(1502). The first three bytes are copied, and the fourth byte is
dropped.
Step 2143 applies to dummy action code
22 (1522). The first two bytes are retained in memory in preparation for
the action code 21 which will immediately follow. There is no further
action with dummy action code 22.
Step 2144 creates a four integer
trailer with five or more bytes for an action code 21 (1521). Full detail
and an example are provided in 1521 above.