File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ impl Manifest {
2626 writer. start ( "level_count" ) ?;
2727 writer. write_u8 ( self . level_count ) ?;
2828
29+ writer. start ( "filter_hash_type" ) ?;
30+ writer. write_u8 ( 0 ) ?; // 0 = XXH3
31+
2932 Ok ( ( ) )
3033 }
3134}
@@ -68,6 +71,20 @@ impl Manifest {
6871 // Currently level count is hard coded to 7
6972 assert_eq ! ( 7 , level_count, "level count should be 7" ) ;
7073
74+ {
75+ let filter_hash_type = {
76+ let section = toc
77+ . section ( b"filter_hash_type" )
78+ . expect ( "filter_hash_type section must exist in manifest" ) ;
79+
80+ let mut reader = section. buf_reader ( path) ?;
81+ reader. read_u8 ( ) ?
82+ } ;
83+
84+ // Only one supported right now (and probably forever)
85+ assert_eq ! ( 0 , filter_hash_type, "filter_hash_type should be XXH3" ) ;
86+ }
87+
7188 Ok ( Self {
7289 version,
7390 tree_type,
You can’t perform that action at this time.
0 commit comments