Browse Source

remove max_chunk_size (unused)

Thomas Waldmann 4 năm trước cách đây
mục cha
commit
3b9798cffc
2 tập tin đã thay đổi với 1 bổ sung10 xóa
  1. 1 1
      src/borg/archive.py
  2. 0 9
      src/borg/chunker.pyx

+ 1 - 1
src/borg/archive.py

@@ -19,7 +19,7 @@ from .logger import create_logger
 logger = create_logger()
 logger = create_logger()
 
 
 from . import xattr
 from . import xattr
-from .chunker import get_chunker, max_chunk_size, Chunk, cached_hash, zeros
+from .chunker import get_chunker, Chunk, cached_hash, zeros
 from .cache import ChunkListEntry
 from .cache import ChunkListEntry
 from .crypto.key import key_factory
 from .crypto.key import key_factory
 from .compress import Compressor, CompressionSpec
 from .compress import Compressor, CompressionSpec

+ 0 - 9
src/borg/chunker.pyx

@@ -308,15 +308,6 @@ def get_chunker(algo, *params, **kw):
     raise TypeError('unsupported chunker algo %r' % algo)
     raise TypeError('unsupported chunker algo %r' % algo)
 
 
 
 
-def max_chunk_size(algo, *params):
-    # see also parseformat.ChunkerParams return values
-    if algo == 'buzhash':
-        return 1 << params[1]
-    if algo == 'fixed':
-        return max(params[0], params[1])
-    raise TypeError('unsupported chunker algo %r' % algo)
-
-
 def buzhash(data, unsigned long seed):
 def buzhash(data, unsigned long seed):
     cdef uint32_t *table
     cdef uint32_t *table
     cdef uint32_t sum
     cdef uint32_t sum