1 --- par2cmdline-0.4/par1fileformat.h.orig 2003-08-01 23:42:21.000000000 +0000
2 +++ par2cmdline-0.4/par1fileformat.h 2005-11-04 10:37:10.725606960 +0000
4 #pragma warning(disable:4200)
7 -struct PAR1MAGIC {u8 magic[8];}PACKED;
8 +struct PAR1MAGIC {u8 magic[8];};
30 --- par2cmdline-0.4/par2fileformat.h.orig 2003-08-01 23:43:40.000000000 +0000
31 +++ par2cmdline-0.4/par2fileformat.h 2005-11-04 10:36:03.149880032 +0000
35 MAGIC magic; // = {'P', 'A', 'R', '2', '\0', 'P', 'K', 'T'}
36 - leu64 length; // Length of entire packet including header
37 + leu64 length PACKED; // Length of entire packet including header
38 MD5Hash hash; // Hash of entire packet excepting the first 3 fields
39 MD5Hash setid; // Normally computed as the Hash of body of "Main Packet"
40 PACKETTYPE type; // Used to specify the meaning of the rest of the packet
44 // The file verification packet is used to determine whether or not any
45 // parts of a damaged file are useable.
52 struct FILEVERIFICATIONPACKET
56 MD5Hash fileid; // MD5hash of file_hash_16k, file_length, file_name
57 FILEVERIFICATIONENTRY entries[];
61 // The file description packet is used to record the name of the file,
62 // its size, and the Hash of both the whole file and the first 16k of
65 //u8* name(void) {return (u8*)&this[1];}
66 //const u8* name(void) const {return (const u8*)&this[1];}
70 // The main packet is used to tie together the other packets in a recovery file.
71 // It specifies the block size used to virtually slice the source files, a count
77 + leu64 blocksize PACKED;
78 leu32 recoverablefilecount;
80 //MD5Hash* fileid(void) {return (MD5Hash*)&this[1];}
81 //const MD5Hash* fileid(void) const {return (const MD5Hash*)&this[1];}
85 // The creator packet is used to identify which program created a particular
86 // recovery file. It is not required for verification or recovery of damaged
90 //u8* client(void) {return (u8*)&this[1];}
94 // The recovery block packet contains a single block of recovery data along
95 // with the exponent value used during the computation of that block.
98 // unsigned long data[];
99 // unsigned long* data(void) {return (unsigned long*)&this[1];}
104 #pragma warning(default:4200)
105 --- par2cmdline-0.4/reedsolomon.cpp.orig 2003-05-26 18:01:31.000000000 +0000
106 +++ par2cmdline-0.4/reedsolomon.cpp 2005-11-04 10:40:23.855246792 +0000
112 bool ReedSolomon<Galois8>::SetInput(const vector<bool> &present)
114 inputcount = (u32)present.size();
120 bool ReedSolomon<Galois8>::SetInput(u32 count)
128 bool ReedSolomon<Galois8>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer)
130 // Look up the appropriate element in the RS matrix
133 // Set which of the source files are present and which are missing
134 // and compute the base values to use for the vandermonde matrix.
136 bool ReedSolomon<Galois16>::SetInput(const vector<bool> &present)
138 inputcount = (u32)present.size();
141 // Record that the specified number of source files are all present
142 // and compute the base values to use for the vandermonde matrix.
144 bool ReedSolomon<Galois16>::SetInput(u32 count)
152 bool ReedSolomon<Galois16>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer)
154 // Look up the appropriate element in the RS matrix