{"repo":"GLOBUS-studio/SypexGeoRS","free":true,"listed":false,"github":"https://github.com/GLOBUS-studio/SypexGeoRS","clone":"git clone https://github.com/GLOBUS-studio/SypexGeoRS.git","description":"Fast zero-dependency pure-Rust reader for SypexGeo binary IP geolocation databases - country, city and region lookups with file, in-memory and batch modes.","language":"Rust","stars":38,"topics":["database","geoip","geolocation","ip-to-country","parsing","rust","sypexgeo","ip-address","ip-geolocation","ip-lookup"],"license":"MIT","category":"databases-storage","readme_excerpt":"sypexgeo (Rust) Pure-Rust reader for the SypexGeo binary IP-to-geo database. Zero runtime dependencies, std only. Supports Country , City and City Max database variants in file, in-memory and batch modes. Port of GLOBUS-studio/SypexGeo (PHP). Features - Pure Rust — no C bindings, no external crates. - Reads SypexGeo v2.x binary .dat files. - File, in-memory and batch lookup modes (combinable as bit flags). - Country code, country ID, city, and full city+region+country lookups. - Full pack-format binary decoder (all 14 field types). - IPv4 only; private/reserved ranges return empty/None. Requirements - Rust 1.70 or newer. - A SypexGeo binary database file — download from sypexgeo.net. Installation Published on crates.io: Or via Cargo: Usage Lookup modes Modes are bit flags and may be combined: Constant Value Behaviour --------------- ----- -------------------------------------------------- mode::FILE 0 Read from disk on every lookup. Lowest memory. mode::MEMORY 1 Load the whole database into RAM. Fastest reads. mode::BATCH 2 Pre-decode indices for faster repeated lookups. API reference Method Returns ------ ------- open(path, flags) Result get(ip) Option — City for City DB, Country otherwise get country(ip) String — ISO 3166-1 alpha-2 code, empty for invalid IPs get country id(ip) u32 — Internal numeric country ID, 0 for invalid IPs get city(ip) Option — { city, country } get city full(ip) Option — { city, region, country } about() About — Database metadata Notes: - IPv4 only.","default_branch":null,"files":null,"tree":[],"storefront":"/r/GLOBUS-studio","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/GLOBUS-studio/SypexGeoRS/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}