moving some decls out of db_format.cpp into a new header db_format.h