Skip to content

Releases: marselester/maxminddb.zig

v0.4.0

05 Mar 22:27

Choose a tag to compare

Fix within() bugs that caused nodes skipping:

  • When startNode() returns a data pointer, the code skipped it because of "if (node < node_count)".
  • When traversing the prefix, if a data record is encountered before exhausting all prefix bits (querying /24 but record is at /23), the code skipped the data pointer.

Add IP address validation to within() and lookup: when IPv6 address was used on IPv4-only database, the results could be garbage, so such address is rejected now.

Full Changelog: v0.3.0...v0.4.0

v0.3.0

27 Feb 22:50

Choose a tag to compare

What's Changed

  • Fields filtering to speed up decoding #8
  • Refactor lookup() and within() #9
  • within() iterator caches records #10
  • Decode any record (schemaless) #12

Full Changelog: v0.1.0...v0.3.0

v0.2.0

20 Feb 01:14

Choose a tag to compare

Changelog

  • Network.parse was added to parse CIDR
  • Fields filtering was added to speed up decoding. Note, lookup and within now expect Options struct.
const fields = maxminddb.Fields.from(maxminddb.geolite2.City, &.{ "city", "country" });
const city = try db.lookup(allocator, maxminddb.geolite2.City, &ip, .{ .only = fields });

Basic features

19 Feb 16:19

Choose a tag to compare

This release provides:

  • basic features found in Go/Rust libraries such as lookup by IP and network traversal
  • safety checks seen in Go/Rust libraries
  • compliance with the MaxMind DB spec, e.g., the requirement for struct fields to match database field order requirement was removed from the library