/[rdiff-backup]/rdiff-backup/rdiff_backup/Rdiff.py
ViewVC logotype

Diff of /rdiff-backup/rdiff_backup/Rdiff.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by bescoto, Sat Aug 13 01:37:44 2005 UTC revision 1.12 by bescoto, Thu Aug 18 04:12:54 2005 UTC
# Line 38  def find_blocksize(file_len): Line 38  def find_blocksize(file_len):
38          patching can take a really long time.          patching can take a really long time.
39    
40          """          """
41          if file_len < 1024000: return 512 # set minimum of 512 bytes          if file_len < 4096: return 64 # set minimum of 64 bytes
42          else: # Split file into about 2000 pieces, rounding to 512          else: # Use square root, rounding to nearest 16
43                  return long((file_len/(2000*512))*512)                  return long(pow(file_len, 0.5)/16)*16
44    
45  def get_delta_sigfileobj(sig_fileobj, rp_new):  def get_delta_sigfileobj(sig_fileobj, rp_new):
46          """Like get_delta but signature is in a file object"""          """Like get_delta but signature is in a file object"""

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26