
RPatricia provides a Ruby library for efficient IPv4 and IPv6 address/prefix storage and lookups. Internally it uses a Patricia trie (also known as radix tree), a data structure commonly used for routing table lookups and supports prefix insertion/removal and best/exact match lookups.
The trie data structure is implemented in C, making rPatricia fast and featuring a low memory footprint.