diff --git a/src/borg/hashindex.pyx b/src/borg/hashindex.pyx index 4725f617f..83ae938ca 100644 --- a/src/borg/hashindex.pyx +++ b/src/borg/hashindex.pyx @@ -2,24 +2,19 @@ from collections import namedtuple import os import struct -cimport cython - from borghash cimport _borghash API_VERSION = '1.2_01' cdef _NoDefault = object() -_MAX_VALUE = 4294966271UL # 2**32 - 1025 -assert _MAX_VALUE % 2 == 1 - ChunkIndexEntry = namedtuple('ChunkIndexEntry', 'refcount size') class ChunkIndex: """ - Mapping of 32 byte keys to (refcount, size), which are all 32-bit unsigned. + Mapping from key256 to (refcount32, size32) to track chunks in the repository. """ MAX_VALUE = 2**32 - 1 # borghash has the full uint32_t range @@ -83,8 +78,9 @@ FuseVersionsIndexEntry = namedtuple('FuseVersionsEntry', 'version hash') class FuseVersionsIndex: - # key: 16 bytes, value: 4 byte version + 16 bytes file contents hash - + """ + Mapping from key128 to (file_version32, file_content_hash128) to support the FUSE versions view. + """ def __init__(self): self.ht = _borghash.HashTableNT(key_size=16, value_format="