I am starting using tkrzw for my project project, and I've observed that for tkrzw 1.03.2 the actual structure of the TreeDBM file differs
form the descrition, in particlular the "magic data" corresponds to those expected for HashDBM
Simple check/reproducer
import tkrzw, io
open_params = {
"concurrent" : True ,
"truncate" : False ,
}
filename = 'QUQU1'
# Prepares the database.
dbm = tkrzw.DBM()
dbm.Open(filename, True, dbm = 'TreeDBM' , **open_params )
aaa = dbm.Inspect()
print ( 'DBTYPE' , aaa['class'] )
dbm [ "first" ] = "hop"
dbm.Close()
with io.open ( filename ,'rb' ) as f : s16 = f.read(16)
print ( 'MAGIC9:' , s16[:9] )
it produces the output L
DBTYPE TreeDBM
MAGIC9: b'TkrzwHDB\n'
However according to https://dbmx.net/tkrzw/#treedbm_format
the first four bytes must be TDB\0
I am starting using tkrzw for my project project, and I've observed that for tkrzw 1.03.2 the actual structure of the TreeDBM file differs
form the descrition, in particlular the "magic data" corresponds to those expected for HashDBM
Simple check/reproducer
it produces the output L
However according to https://dbmx.net/tkrzw/#treedbm_format
the first four bytes must be
TDB\0