About this project
ip2region is an offline IP address localization library and IP data management framework that supports both IPv4 and IPv6 with query efficiency at the 10-microsecond level. The project provides xdb data generation and query client implementations for many mainstream programming languages.
Key features include:
1. Offline Localization Library: The project provides raw data for both IPv4 and IPv6, along with corresponding xdb files to achieve city-level query localization. The field format is Country|Province|City|ISP|iso-alpha2-code. Localization information for China is in Chinese, while non-China areas are in English.
2. Data Management Framework: The xdb format supports hundreds of millions of IP data segment rows. Region information supports full customization, allowing users to append data for specific business needs such as GPS information, international standard regional codes, or zip codes.
3. Data Deduplication and Compression: The xdb format generation program automatically processes input raw data, checks and completes merging of adjacent IP segments, and performs deduplication and compression of identical regional information.
4. High-Speed Query Response: Single query response time is at the 10-microsecond level. Memory-accelerated queries can be enabled through vIndex index caching (512KiB memory, ~100 microseconds) or entire xdb file caching (memory usage equals xdb file size, 10-microsecond level).
5. Unified Query Interface: xdb provides version-compatible query implementations with a unified API that simultaneously supports both IPv4 and IPv6 data queries.
The project provides query client implementations for Golang, PHP, Java, C, Lua, Rust, Python, JavaScript, C#, Erlang, Nginx, C++, and Cangjie. Generation programs are available for Golang, Java, Python, C#, Rust, and C++.
The core of the ip2region project lies in researching the design and implementation of IP data storage and fast querying. Raw data is updated irregularly, and for scenarios requiring high data accuracy and update frequency, commercial offline data is available from the Ip2Region Community.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.