How come the Result is Correct ?

25 views
Skip to first unread message

Allan Fernandes

unread,
Jan 10, 2022, 8:51:08 AM1/10/22
to librsync
Hi,

With the following situation how come the Patch result is correct ?
BASISIN file size     = 1,229,399,040 Bytes
First DELTA              =         1,362,761  Bytes
Second DELTA         =           330,571  Bytes
PATCH x 2 Result    = 1,249,969,152  Bytes

After Both the Patching the resultant file size increases by 20MB which is correct
whereas the size of the two Deltas combined is 1.7MB
How is this logically possible ?

Martin Pool

unread,
Jan 10, 2022, 10:42:39 AM1/10/22
to Allan Fernandes, librsync
Please show the series of operations or commands you did on these files? 

But just from what you said: librsync deltas can copy data from the basis file any number of times. That could account for the output growing by more than the size of the delta. 

For example if the new file is 10 copies of the basis file concatenated, librsync should recognize this and produce a small delta. 

--
You received this message because you are subscribed to the Google Groups "librsync" group.
To unsubscribe from this group and stop receiving emails from it, send an email to librsync+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/librsync/014e83aa-7cd0-4a47-9c10-08606ecf75b8n%40googlegroups.com.

Allan Fernandes

unread,
Jan 10, 2022, 1:02:06 PM1/10/22
to librsync
Backup)
Day1)        Simple Copy of MyFile.Dat
                   rdiff.exe -b 10240 signature MyFile.Dat MyFile.SIG1

Day2)         rdiff.exe -b 10240 delta MyFile.SIG1 MyFile.Dat MyFile.DLT1
                    rdiff.exe -b 10240 signature MyFile.Dat MyFile.SIG2


Day3)        rdiff.exe -b 10240 delta MyFile.SIG2 MyFile.Dat MyFile.DLT2


Restore)    rdiff.exe -b 10240 patch MyFile.Dat MyFile.DLT1 MyFile.NEW1
                   rdiff.exe -b 10240 patch MyFile.NEW1 MyFile.DLT2 MyFile.NEW2


The example I have taken is a PST file (MS Outlook).
Quite likely there is repetitive email content within.

Amounts to Deduplication logic along with the Delta incremental.

Thank You

Donovan Baarda

unread,
Jan 10, 2022, 5:13:05 PM1/10/22
to Allan Fernandes, librsync
Assuming the sizes you quote for the delta files are not compressed, some of the additional data in the final output must be duplicated from the original basis input and/or first delta file.

This means the delta file just includes copy instructions to copy the extra data from the basis file, and doesn't need to include the extra data itself.

A common example would be additional zeroed blocks in a filesystem image, but any kind of data duplication in the file will do this.
Reply all
Reply to author
Forward
0 new messages