Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I'm doing a small backup utility.This backup should be incremental. Suppose I have 2 files, then my backup destination must contain differences of those two files only (Patch file generation). I googled it to search the ways to do this! I found "Delta encoding". But I don't have idea about how to implement that.?

Please anyone suggest any ideas to accomplish this.. And suggest any sample C# code also!

Thank you!
Posted

1 solution

Um.
The first page when you google "Delta encoding" is Wiki: Delta encoding - Wikipedia, the free encyclopedia[^] which includes sample code in C.
If you can't cope with implementing a trivial piece of code like that - which should be pretty obvious even if you don't specifically know anything but C# - then to be honest I'd suggest that you are trying to run before you can walk. Backups are serious business: and you shouldn't attempt to write a backup system of your own unless you are very, very sure that you know what you are doing. Remember, you will be using this (and you'll probably be the only person using it) to save your work in the event of a major failure (or even accidental deletion) - and the last thing you need at that point is to find a bug in your code that means you didn't back up properly, or that the exe you need to restore from the backup is ... only in the backup file ...

I know what I'm doing - or I like to think so - and I use a commercial backup package (AOMEI Backupper) rather than write my own for just that reason! :laugh:
In all seriousness, I'd strongly recommend you find a project that is a lot less mission critical until you have a good deal of experience under your belt - backups are a serious business and should be treated as such.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900