Patent ID: 7398278

Claim:
A method of storing addresses in a database comprising: generating original prefixes representing the addresses to be stored in the database; dynamically determining prefix lengths; generating reduced prefixes by at least one of collapsing and collapsing followed by expanding the original prefixes such that a number of reduced prefixes is less than a number of original prefixes, wherein the expanding is performed using a sub-process comprising: (a) selecting a largest prefix length; (b) allocating prefixes of the largest prefix length into one or more bins with preselected capacities; (c) selecting a bin from the number of bins that is partially filled; (d) expanding a subset of prefixes of a next largest populated length and allocating them to the selected bin until the selected bin is full; (e) repeating (a) through (d) for all prefix lengths; and storing the reduced prefixes in the database.