source code for locate database

where's the source code file where's exaplained the data structure of this file:
used by /usr/libexec/locate.updatedb ?
You are aware that /usr/libexec/locate.updatedb is a shell script? So there's also your sourcecode ;)

Also see locate.concatdb, the actual utilities are locate.bigram and locate.code which are ELF binaries, and those can be found where all source code is: /usr/src (provided you installed it). You're looking for /usr/src/usr.bin/locate in specific.