1NSD 4.0 DATABASE FORMAT. 2 3The NSD 4.0 database format is different from NSD 2 and NSD 3. 4 5It stores RRs, but in a way that they can be edited without leaking space. 6The file contains a 'buddy-system-style' 'malloc' of chunks. Pointers are 7offsets from the start of the file. For every pointer the reverse is 8kept track of, so that chunks can be moved to a new position. Free space 9is reused, and (gradually) moved to the end to shorten the file. 10 11It is about 23x larger than the NSD3 format and about 3x to 6x slower 12to read and write a full database. But you can use a tree to fetch a 13particular item at log(N) cost, and update a single item at log(N) cost. 14 15Therefore, adding a zone or removing a zone does not need a new compile 16of the nsd database, but can be performed by editing the database. 17 18The file format is endian-dependent, and uses 64bit file offsets. 19 20The file chunk format is defined in udb.h. 21the tree for lookups is defined in udbradtree.h. 22The rrsets and zone format is defined in udbzone.h. 23