I have devised a "byte country code", called such because it gives each country in the world a number between 0 and 255 inclusive, essentially allowing every country to be represented by just one byte of data. I conceived this as part of an idea of integrating "location identifiers" into IPv6 addresses. Location identifiers would be two bytes in length, where the first byte draws from the code below, and the second byte represents a first-level administrative division in the country corresponding to the first byte. I have put this code here to make flag tracking easier for myself, as I have recently acquired a brief, but deep interest in flags.
All countries that have officially-assigned and exceptionally-reserved codes (by the ITU and UPU only) in ISO 3166-1, as well as a few other remote autonomous locations, are used in this code. Codes are assigned in a geographical order. Countries in a certain region of the world are grouped into consecutive code ranges. The five major continental areas each have their own code range, and there is also a "wildcard" code range, used to represent regions, and for cases when all countries in a major continental area cannot fit into their corresponding code range.
A few of the numbers in the code below link to their countries' administrative division code lists (the second byte of the two-byte location code).
Legend: Wildcard Africa Europe Asia Pacific Americas