{"id":16881573,"url":"https://github.com/benbjohnson/vex","last_synced_at":"2025-04-11T11:45:19.031Z","repository":{"id":57572618,"uuid":"324197596","full_name":"benbjohnson/vex","owner":"benbjohnson","description":"Variable-length, lexicographically-sortable hex format for uint64 values.","archived":false,"fork":false,"pushed_at":"2020-12-24T16:58:26.000Z","size":2,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T21:05:50.274Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benbjohnson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-24T16:38:16.000Z","updated_at":"2022-03-03T14:41:12.000Z","dependencies_parsed_at":"2022-08-24T08:41:26.152Z","dependency_job_id":null,"html_url":"https://github.com/benbjohnson/vex","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbjohnson%2Fvex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbjohnson%2Fvex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbjohnson%2Fvex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbjohnson%2Fvex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benbjohnson","download_url":"https://codeload.github.com/benbjohnson/vex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248387724,"owners_count":21095262,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T16:04:01.720Z","updated_at":"2025-04-11T11:45:18.999Z","avatar_url":"https://github.com/benbjohnson.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"vex\n===\n\nVex is a variable-length, lexicographically-sortable hex format for uint64 values.\nIt can be used instead of `fmt.Sprintf(\"%016x\", v)` for shorter strings.\n\n\n## Usage\n\nValues can be formatted to strings using the `Format()` function and formatted\nstrings can be parsed using the `Parse()` function. Easy peasy.\n\n```go\nFormat(v uint64) string\nParse(s string) (uint64, error)\n```\n\n\n## How it works\n\nVex simply formats a value as an unpadded hex-encoded number and then prepends\nthe length of the resulting string (minus 1) as a hex value.\n\nHere are some examples of encodings:\n\n```\nDECIMAL   HEX   VEX    ZERO-PADDED\n0         0     00     0000000000000000\n1         1     01     0000000000000001\n2         2     02     0000000000000002\n10        a     0a     000000000000000a\n15        f     0f     000000000000000f\n16        10    110    0000000000000010\n288       120   2120   0000000000000120\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenbjohnson%2Fvex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenbjohnson%2Fvex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenbjohnson%2Fvex/lists"}