Elektrine lite

← Feed

@nicolaasuni@mastodon.social

2026-07-25 11:00 UTC

A party trick with a practical side: an entire ISO 3166 country record packed into one uint64. Country codes draw on 26 letters, so 5 bits per letter, and the whole record decodes with masks and shifts. The countrycode package in nurago derives all its reverse indexes from those integers. The article unpacks a real stored key, bit range by bit range. https://tecnick.com/articles/nurago-countrycode/ #golang

Replies (0)

No replies.