We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4715e0 commit 65a8518Copy full SHA for 65a8518
README.rst
@@ -98,8 +98,11 @@ Example code
98
99
# HashTableNT mapping 256bit key [bytes] --> Chunk value [namedtuple]
100
Chunk = namedtuple("Chunk", ["refcount", "size"])
101
+ ChunkFormat = namedtuple("ChunkFormat", ["refcount", "size"])
102
+ chunk_format = ChunkFormat(refcount="I", size="I")
103
+
104
# 256bit (32Byte) key, 2x 32bit (4Byte) values
- ht = HashTableNT(key_size=32, value_format="<II", value_type=Chunk)
105
+ ht = HashTableNT(key_size=32, value_type=Chunk, value_format=chunk_format)
106
107
key = b"x" * 32 # the key is usually from a cryptographic hash fn
108
value = Chunk(refcount=1, size=42)
0 commit comments