The present invention provides a data-structure to store a search database
and provides techniques to build this datastructure given a list of
prefixes (P) and to search this database efficiently for a best matching
prefix for an address D. The data-structure can be stored in standard
memory (14), where values are stored associated with memory address
locations. The data structure includes representations of addressable
linked tables (FIG. 3b). The representations are related to a binary
search trie (FIG. 1) and each linked table (T) has at least one entry.
Entries in a table span more than one level of the binary search trie.
The spanning feature relates to compression of a binary search trie into
a finite number of levels (and hence tables). The finite number is less
than the number of levels in the binary search trie. Hence the search
algorithm is restricted to a finite, and predetermined number of search
accesses to the tables to obtain a best-match result.