X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=lib%2Fbup%2Fhashsplit.py;h=ff00e54b3cd46b4fda1b30827e03762c7ebce025;hb=5e9fb7e5582d1c30c77265a416a5c1d172fdd501;hp=01e11a67c6ea89884edb8fd6e1aa9373d0fa4b58;hpb=d83b0a2939617be2ed1602f8cf746334a73697ee;p=bup.git diff --git a/lib/bup/hashsplit.py b/lib/bup/hashsplit.py index 01e11a6..ff00e54 100644 --- a/lib/bup/hashsplit.py +++ b/lib/bup/hashsplit.py @@ -2,16 +2,16 @@ from __future__ import absolute_import import io, math, os -from bup import _helpers, compat, helpers +from bup import _helpers, helpers from bup._helpers import cat_bytes -from bup.compat import buffer, py_maj +from bup.compat import buffer from bup.helpers import sc_page_size _fmincore = getattr(helpers, 'fmincore', None) BLOB_MAX = 8192*4 # 8192 is the "typical" blob size for bupsplit -BLOB_READ_SIZE = 1024*1024 +BLOB_READ_SIZE = 8 * 1024 * 1024 MAX_PER_TREE = 256 progress_callback = None fanout = 16 @@ -37,12 +37,12 @@ class Buf: self.data = cat_bytes(self.data, self.start, remaining, s, 0, len(s)) self.start = 0 - + def peek(self, count): if count <= 256: return self.data[self.start : self.start + count] return buffer(self.data, self.start, count) - + def eat(self, count): self.start += count