I'm writing a C# app that needs to be able to repair a set of files using par2 parity files. For C++ there is lots to be found that'll do exactly that, but for C# I can't find a native implementation.
One option would be using a C++ DLL from C#, but I'd rather not do that since it's not possible to use a 32bits dll in an x64 app so I'd be limiting my app to 32bits mode.
Another option is to shellexecute par2cmdline in the background, but I'd rather have more control over the process (progress, cancelling etc.).
Does anyone know of a native C# implementation that'll repair files using a par2 set ?
Meskipun C dibuat untuk memprogram sistem dan jaringan komputer namun bahasa ini juga sering digunakan dalam mengembangkan software aplikasi. C juga banyak dipakai oleh berbagai jenis platform sistem operasi dan arsitektur komputer, bahkan terdapat beberepa compiler yang sangat populer telah tersedia.
C adalah huruf ketiga dalam alfabet Latin. Dalam bahasa Indonesia, huruf ini disebut ce (dibaca [tʃe]).
Bahasa pemrograman C ini dikembangkan antara tahun 1969 – 1972 oleh Dennis Ritchie. Yang kemudian dipakai untuk menulis ulang sistem operasi UNIX. Selain untuk mengembangkan UNIX, bahasa C juga dirilis sebagai bahasa pemrograman umum.
Do you want to stick with PARs themselves? I have a fully native Reed/Solomon implimentation I would post if it will help (the match that PARs are based on), but I don't have anything for all the file handling and breakup.
My code is an implementation of Stream and produces a string with all the error correcting data included. You can then corrupt that data and send it back and it system will automatically recover it. I would just post it but it is long and I am too lazy to make a blog post and link to it.
To make that work like PAR, you would have to break that up into files, then build a system that can identify missing volumes and 'adds in' corrupt data for all the missing data (the math cannot handle missing data, only corrupt).
Also, as a note on performance, the system this was built for was rather 'bursty', it would get in lots of 100k streams at a time, but also have long waits of doing nothing. The C# version of the math worked about 6% faster then the pure C version. If I did performance testing using just non-stop load, the C# runs about 1-2% slower. In my experience, most C to C# math conversions have the same performance results.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With