Simple version-numbering encoding and helper methods