Date : Wed, 23 Aug 2006 18:51:35
From : Sprow <info@...>
Subject: Re: Hard disk backup - another challenge
In article <060822215504@...>,
Jonathan Graham Harston <jgh@...> wrote:
> >Message-ID: <001f01c6c5d4$41860a80$0301a8c0@...>
>
> "David Harper" <dl.harper@...> wrote:
> > Andrew Benham wrote:
> > >
> > > Ah, that'll be the 10 MegaByte $.DOS.DRIVE_C file then - i.e. the
> > > file used by the 80186 Co-Processor to provide the DOS+ file system.
> > > That DOS+ file system is nothing like full, so there's loads of
> > > sectors which I don't need to backup.
> >
> > ADFS sees the whole of $.DOS.DRIVE_C as a single file and has no way of
> > understanding its contents. A simple ADFS back-up is bound to transfer
> > the whole of this big "file" entire.
>
> [...] a file full of repetative data takes the
> same time as a file full of random data. It would be worth
> updating it to send the data in packets with some form of
> compression, such as "this packet is all zeros".
Just a crude run length encoding is required, can't be more than a couple of
lines of code.
Reserve a byte as a token eg. FF. Output the token plus the repeated byte
plus the number of repeats (maybe a 2 byte field?). Escape the token with
itself to send just the token.
Try to choose a token that doesn't appear in the data too often, so not zero
for example!
Sprow.