C # Get the difference between two files and use it for incremental backup

I want to create my own incremental backup solution using C #. How can I get the difference between two files (version 1 and version 2 of ABC.TXT) and then update the version of ABC.TXT version 1 with the difference? Appreciate some of the tips! Thanks!

+3
source share
4 answers

Here's something that I'm just Google might be useful as a starting point:

O (ND) Difference Algorithm for C #

+1
source

Here are some articles for some diff algorithms described in C #

Codeproject 1

Codeproject 2

. kdiff3 - , .

+2

Do you really need an incremental backup? Is there a reason you can't just replace version 1 with version 2?

And as John pointed out, you might be better off using an already existing and tested backup solution.

0
source

I'm not sure how exactly you will replace the text “difference”, as this can become quite complicated. But for an initial check, you can compare file sizes.

The link below may help you:

http://dotnetperls.com/file-size

-1
source

Source: https://habr.com/ru/post/1719493/


All Articles