text stringlengths 0 99.6k |
|---|
ARC calculates a two byte checksum for each file in an |
archive. The checksum is calculated using the bytes of |
the original file before they are passed on to the |
compression routines. When you verify an archive, ARC |
actually de-compresses each archive entry and |
calculates a new checksum using the bytes passed to it |
by the decompressor. Both checksums should be the same. |
If they do not match, an error message is displayed |
indicating that the archive may have been corrupted due |
to a disk error or a transmission error during upload |
or downloading. |
Again the syntax is the same as that for ARC/X. |
By now you must have noticed that ARC/X ARC/P and |
ARC/V are all minor variations of the same thing. |
ARC VERSION 2.20 PAGE - 27 |
4) MEMORY MAP |
$033c-$03ff - cassette buffer. used by ARC |
$0801-$0fff - not used |
$1000-$4fff - work space for ARC/C and ARC/X |
CRUNCH string table is stored here |
$5000-$7fff - workspace for ARC and MOVE |
commands only. All other commands |
leave this area alone. |
$8000-$8fff - used in 80 column version. (ROM) |
$9000-$97ff - not used |
$9800-$9fff - 80 column screen. |
Not used in 40 column ARC |
$a000-$bfff - program area. ARC, MOVE, and DIR |
$c000-$cfff - program area. Editor commands. |
(sys 12*4096 to enable ARC after |
a KILL) |
$d000-$ffff - work space for ARC/C and ARC/X |
You may notice that there is a rather significant |
jump in the amount of workspace that ARC needs to do |
its job from previous versions of ARC (28K to be |
exact). This is due to the CRUNCH routines, which are |
rather demanding in terms of memory. If you have a |
program in memory when archiving or dearchiving a file, |
then it will almost certainly be clobbered by ARC. |
When invoking the ARC command, BASICs pointers are |
not changed in any way by ARC. You may have to type NEW |
before running a program after using the ARC command. |
(otherwise you may get an ?out of memory error.) |
ARC VERSION 2.20 PAGE - 28 |
THEORY OF OPERATION |
All methods of data compression take advantage of |
redundancy of one form or another. Run-length coding is one |
of the simplest, and often the most effective techniques. |
Graphics files often contain long sequences of the same |
byte. Zeros for blank space, or 255's for filled in space. |
Run-length coding recodes these long sequences as shorter |
control sequences. For example, a graphical image stored in |
RAM may look something like the following if viewed with |
the machine language monitor: |
.:2000 00 00 00 00 00 00 00 00 |
.:2008 00 00 ff ff ff ff ff 00 |
.:2010 00 00 00 00 00 00 00 00 |
.:2018 a0 0b ff ff ff ff ff ff and so on.... |
This could be stored on disk as the sequence: |
fe 00 0a fe ff 05 fe 00 09 a0 0b fe ff 06 |
The first byte ($fe) is a control character. When the |
unsqueeze routine encounters a one of these it gets the next |
two characters and interprets them as a character |
identifier and a count. Thus the first 3 byte sequence is |
interpreted as 10 zeros, the next 3 byte sequence as 5 ff's |
and so on. When a character is not repeated, it is simply |
coded directly to the output file. (the $a0 at $2018 above) |
And so the above is squeezed from 32 bytes down to 14. |
Database programs often sacrifice disk space in order |
to gain speed. Relative files, for instance, store their |
data at the beginning of each record, and pad the record |
with zeros. Since every record is the same length, the DOS |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.