Dec 122017
 
SHADE is a way of packetizing a file for transmission via e-mail in such a way that if some of the packets are lost, the original file can still be recovered thanks to a novel application of the Chinese Remainder Theorem.

Full Description of File


SHADE will packetize a file for transmission
via e-mail in such a way that if some of the
packets are lost, the original file can be
recovered thanks to a novel application of
the Chinese Remainder Theorem. C source code


File SHADE.ZIP from The Programmer’s Corner in
Category C Source Code
SHADE is a way of packetizing a file for transmission via e-mail in such a way that if some of the packets are lost, the original file can still be recovered thanks to a novel application of the Chinese Remainder Theorem.
File Name File Size Zip Size Zip Type
CHECK.C 2460 912 deflated
FILE_ID.DIZ 227 162 deflated
MAKEFILE 1258 424 deflated
MAKE_PRI.C 4587 1422 deflated
MAKE_TAB.C 1793 604 deflated
POLY.A68 6529 1200 deflated
POLY.C 5633 2058 deflated
PROJECT.C 6427 2371 deflated
SHADE.C 17250 3661 deflated
SHADE.DOC 2842 1238 deflated
SHADE.H 2326 893 deflated
TEST.IN 4723 1701 deflated
TEST.ORI 3200 319 deflated
UUCODE.C 3780 1393 deflated

Download File SHADE.ZIP Here

Contents of the SHADE.DOC file


From: [email protected] (Philippe Hebrais)
Newsgroups: alt.sources
Subject: shade -- split a file with shadows
Message-ID:
Date: 13 Dec 92 07:57:05 GMT
Organization: Secte des adorateurs des semiconducteurs
Lines: 675
X-Newsreader: MeNews 2.8.0


SSSSS HH HH AAA DDDD EEEEEEE
SS SS HH HH AA AA DD DD EE
SSS HH HH AA AA DD DD EE
SSS HH HH AA AA DD DD EE
SSS HHHHHHH AAAAAAA DD DD EEEE
SSS HH HH AA AA DD DD EE
SSS HH HH AA AA DD DD EE
SS SS HH HH AA AA DD DD EE
SSSSS HH HH AA AA DDDD EEEEEEE

`shade' is a file splitting and merging utility. It takes a large
file and splits it into uniformly sized blocks. It can also output
extra blocks (called shadows). These shadows can be used to recover
missing sections if they get corrupted or it they are lost. With a
single shadow, `shade' can recover ANY single missing block. As many
shadows are needed as there are blocks missing. If too few blocks
and shadows are available, nothing can be recovered.

For example, foo.bar (259042 bytes) is split into 5 sections
of 45000 bytes, 1 section of 34042 bytes and 2 shadows of
45000 bytes. Each of these 8 parts is sent through email.
Even if any two of these eight parts gets lost, the original
foo.bar can be reconstructed.

`shade' is a simple application of the chinese remainder theorem
for polynomials with coeficients modulo two. For more information
see the comments at the beginning of project.c.



SAMPLE USAGE

Split "bar" (111042 bytes) into 20000 byte chunks and output 2
shadows. All these parts will be uuencoded and output to
foo.uu.001, foo.uu.002, etc.

% shade -u -k 2 -l 20000 -o foo bar
[001] [002] [003] [004] [005] [006] [aaa] [aab] Done.

Merge these parts back together:

% rm foo.uu.003 foo.uu.005
% cat foo.uu.* | shade -m -u
Merging bar (111042 bytes)
Got section 4 (20000 bytes)
Got section 1 (20000 bytes)
Got section 2 (20000 bytes)
Got section 6 (11042 bytes)
Got shadow 1 (20000 bytes)
Got shadow 2 (20000 bytes)

Missing: [003] [005]

Recovering 2 sections:
[001] [002] [aaa] [004] [aab] [006]



DISTRIBUTION

Shade is copyright Philippe Hebrais 1992. You have the permission
to use this code is anyway you feel appropriate as long as you give
credit where it is due. There is no warranty of any kind. I am not
responsible for any damage caused directly or indirectly by this
program.


AUTHOR
,
Philippe Hebrais

--
Philippe Hebrais [email protected]
Voix: (514)731-9146 uunet!philmtl!altitude!mirkwood!hebrais



 December 12, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)