Skip to content

Commit 65a8518

Browse files
update README
1 parent d4715e0 commit 65a8518

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,11 @@ Example code
9898

9999
# HashTableNT mapping 256bit key [bytes] --> Chunk value [namedtuple]
100100
Chunk = namedtuple("Chunk", ["refcount", "size"])
101+
ChunkFormat = namedtuple("ChunkFormat", ["refcount", "size"])
102+
chunk_format = ChunkFormat(refcount="I", size="I")
103+
101104
# 256bit (32Byte) key, 2x 32bit (4Byte) values
102-
ht = HashTableNT(key_size=32, value_format="<II", value_type=Chunk)
105+
ht = HashTableNT(key_size=32, value_type=Chunk, value_format=chunk_format)
103106

104107
key = b"x" * 32 # the key is usually from a cryptographic hash fn
105108
value = Chunk(refcount=1, size=42)

0 commit comments

Comments
 (0)