travisgoodspeed / md380tools

Python tools and patched firmware for the TYT-MD380
803 stars 245 forks source link

Add support for the indexed users db format #933

Closed DaleFarnsworth closed 2 years ago

DaleFarnsworth commented 2 years ago

The indexed format is a tree-structured database. Each unique string is stored only once in the db and referenced through pointers by each dmr ID entry that uses that string.

The new format uses about half the space of the standard md380 userdb format.

DaleFarnsworth commented 2 years ago

Hi Travis. Please review and comment. I've been running this code and new db format for a couple of months now without any issues. After support for the new db format is added to md380tools, the firmware will support either format. The new format begins with a line containing a single ascii "0" character so old firmware treats it as a db without any entries. A description of the format is contained in README-INDEXEDDB.md .

DaleFarnsworth commented 2 years ago

After seeing that the db pulled by "make updatedb" contains no cities or states, I'm going to modify the new db format to more space-efficiently handle this case. I'd still like to get comments on the overall concept and the possibility of acceptance into md380tools, but please don't merge this code. Thanks.

DaleFarnsworth commented 2 years ago

Closing and will replace with a new Pull Request.