animetosho / ParPar

High performance PAR2 create client for NodeJS
195 stars 21 forks source link

how to use parpar to create multiple par2 files? #10

Closed sanderjo closed 6 years ago

sanderjo commented 6 years ago

Short (NOOB) question: how should I use parpar to create multiple par2 files?

From the help:

Examples

parpar -s 1M -r 64 -o my_recovery.par2 file1 file2 Generate 64MB of PAR2 recovery files from file1 and file2, named "my_recovery"

So I tried that:

sander@Stream-13:~/git/ParPar$ bin/parpar.js  -s 1M -r 64 -o my_recovery.par2 million-50M.bin 
Method used: XOR JIT (128 bit), 2 threads
Calculating: 100.00%
PAR2 created. Time taken: 1.541 second(s)

but that creates:

-rw-r--r--  1 sander sander     1424 nov  6 21:04 my_recovery.par2
-rw-r--r--  1 sander sander 67121180 nov  6 21:04 my_recovery.vol00-64.par2

With the classic par2 and par2 create -r10 -n7 my_par2_files million-50M.bin, I get

-rw-r--r--  1 sander sander    40408 nov  6 21:11 my_par2_files.par2
-rw-r--r--  1 sander sander   133292 nov  6 21:11 my_par2_files.vol000+02.par2
-rw-r--r--  1 sander sander   226176 nov  6 21:11 my_par2_files.vol002+04.par2
-rw-r--r--  1 sander sander   371636 nov  6 21:11 my_par2_files.vol006+08.par2
-rw-r--r--  1 sander sander   622248 nov  6 21:11 my_par2_files.vol014+16.par2
-rw-r--r--  1 sander sander  1083164 nov  6 21:11 my_par2_files.vol030+32.par2
-rw-r--r--  1 sander sander  1964688 nov  6 21:11 my_par2_files.vol062+64.par2
-rw-r--r--  1 sander sander  2227568 nov  6 21:11 my_par2_files.vol126+74.par2
kouze commented 6 years ago

hi,

try with -d pow2

thanks

sanderjo commented 6 years ago

Cool, that works! Thank you.

sander@Stream-13:~/git/ParPar$ bin/parpar.js -d pow2 -s 1M -r 64 -o my_recovery.par2 million-50M.bin 
Method used: XOR JIT (128 bit), 2 threads
Calculating: 100.00%
PAR2 created. Time taken: 7.369 second(s)

gives

-rw-r--r--  1 sander sander 52428800 nov  6 20:09 million-50M.bin

-rw-r--r--  1 sander sander     1424 nov  7 18:55 my_recovery.par2
-rw-r--r--  1 sander sander  1050068 nov  7 18:55 my_recovery.vol00-01.par2
-rw-r--r--  1 sander sander  2098712 nov  7 18:55 my_recovery.vol01-03.par2
-rw-r--r--  1 sander sander  4197308 nov  7 18:55 my_recovery.vol03-07.par2
-rw-r--r--  1 sander sander  8393192 nov  7 18:55 my_recovery.vol07-15.par2
-rw-r--r--  1 sander sander 16783652 nov  7 18:55 my_recovery.vol15-31.par2
-rw-r--r--  1 sander sander 33563264 nov  7 18:55 my_recovery.vol31-63.par2
-rw-r--r--  1 sander sander  1050068 nov  7 18:55 my_recovery.vol63-64.par2

Variant:

sander@Stream-13:~/git/ParPar$ bin/parpar.js -d pow2 -s 1M -r10% -o my_recovery.par2 million-50M.bin 
Method used: XOR JIT (128 bit), 2 threads
Calculating: 100.00%
PAR2 created. Time taken: 0.774 second(s)

gives

-rw-r--r--  1 sander sander  1050068 nov  7 18:57 my_recovery.vol00-01.par2
-rw-r--r--  1 sander sander  2098712 nov  7 18:57 my_recovery.vol01-03.par2
-rw-r--r--  1 sander sander  2098712 nov  7 18:57 my_recovery.vol03-05.par2

Great!