コード例 #1
0
ファイル: Interface.cs プロジェクト: pacificIT/Duplicati
 /// <summary>
 /// Generates a delta stream
 /// </summary>
 /// <param name="signature">The signature for the stream</param>
 /// <param name="filename">The (possibly) altered stream to create the delta for</param>
 /// <param name="output">The delta output</param>
 public static void GenerateDelta(Stream signature, Stream input, Stream output)
 {
     SharpRSync.ChecksumFileReader cs = new Duplicati.Library.SharpRSync.ChecksumFileReader(signature);
     SharpRSync.DeltaFile df = new Duplicati.Library.SharpRSync.DeltaFile(cs);
     df.GenerateDeltaFile(input, output);
 }
コード例 #2
0
ファイル: Interface.cs プロジェクト: pacificIT/Duplicati
 /// <summary>
 /// Constructs a stream from a basestream and a delta stream
 /// </summary>
 /// <param name="basefile">The most recent full copy of the file</param>
 /// <param name="deltafile">The delta file</param>
 /// <param name="outputfile">The restored file</param>
 public static void PatchFile(Stream basestream, Stream delta, Stream output)
 {
     SharpRSync.DeltaFile df = new Duplicati.Library.SharpRSync.DeltaFile(delta);
     df.PatchFile(basestream, output);
 }