Bamba wrote:
if you've got data that's uploaded badly why would you ever do anything apart from just reupload it? Any other solution just seems weird and complex and means more 'copies' of the same data floating around (i.e. the original corrupt file chunk which is still there plus whatever new PAR files you upload to fix the corruption). I can only assume I'm missing something fundamental with this stuff because it just seems like an insane way to solve the problem which usually means I've totally misunderstood it.
Okay - i'll try to give a very brief summary here but if you dont get it PM me and we'll not clutter up the thread on it - oh and the reason I know about this is because in the bad old days this was an excellent tool for pirates on newsgroups because there would often be missing files.
I have 600 mb of stuff i want to upload - if i upload that as a single 600mb file the chances of something in there getting corrupted either up or down is high and its an 'all or nothing' type of deal so if its wrong its 600mb every time.
Splitting the files down into smaller chunks (of 50mb) means that if one is corrupted then its just a smaller upload / download for everyone to grab the 'missing' file and its easier both for the uploader or the downloader - that should all be pretty straightforward ?
The 'magic' behind the par files comes when there is a part missing either of a full file or one of the files has a partial corruption on there.
The par files are seen by the system as 'blocks' and it knows it needs (lets keep the numbers simple) 600 blocks to recreate the whole file - when you split out the file you'll get a number of par files with different blocks (say 5 / 10 / 20 / 50) , each one is slightly bigger than the size of just '5' blocks (so in this example if they are 1 meg each the 5 block file is probably more like 7 and the 10 meg will be more like 12) but they can be used to replace *any* missing blocks in the whole file.
So you download the stuff and part 5 is missing , just totally gone , it was 50 blocks so you can download the 50 block 'par' file and it can then recreate that whole file - or you can download 2x20 block par files and a 10 , just as long as you get 50 blocks worth).
*or* you download the files and one of the files is partially corrupted - say file 3 should be 50 blocks but it only shows up as 40 , you can download any par file which contains more than 10 blocks and it will be used to replace the data - so instead of re-downloading another 50 meg you just re-download 12 or so.
Originally I wanted Pars so that i could split the file easily and have a checksum , but if there are 'bad' parts then I can use them to fix things (however in the example here I'll re-upload the totally 'broken' file and probably the partially broken one but Gospvg will just need to download the missing one plus a smaller par file) - oh and yes its probably over complicated for whats happening here but if i just split the files then uploaded them the first report today would have been 'file 4 is broken' and i'd have had to ask someone to re-download it , then i'd have re-uploaded it and assuming it worked then the next message would be 'file 12 is broken' and we'd have gone through the same again