rdiff-backup-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Rdiff-backup-commits] Changes to rdiff-backup/rdiff_backup/Rdiff.py


From: Ben Escoto
Subject: [Rdiff-backup-commits] Changes to rdiff-backup/rdiff_backup/Rdiff.py
Date: Thu, 18 Aug 2005 00:12:55 -0400

Index: rdiff-backup/rdiff_backup/Rdiff.py
diff -u rdiff-backup/rdiff_backup/Rdiff.py:1.11 
rdiff-backup/rdiff_backup/Rdiff.py:1.12
--- rdiff-backup/rdiff_backup/Rdiff.py:1.11     Sat Aug 13 01:37:44 2005
+++ rdiff-backup/rdiff_backup/Rdiff.py  Thu Aug 18 04:12:54 2005
@@ -38,9 +38,9 @@
        patching can take a really long time.
 
        """
-       if file_len < 1024000: return 512 # set minimum of 512 bytes
-       else: # Split file into about 2000 pieces, rounding to 512
-               return long((file_len/(2000*512))*512)
+       if file_len < 4096: return 64 # set minimum of 64 bytes
+       else: # Use square root, rounding to nearest 16
+               return long(pow(file_len, 0.5)/16)*16
 
 def get_delta_sigfileobj(sig_fileobj, rp_new):
        """Like get_delta but signature is in a file object"""




reply via email to

[Prev in Thread] Current Thread [Next in Thread]