{"id":16122039,"url":"https://github.com/foxcapades/go-bytify","last_synced_at":"2025-10-03T16:18:27.634Z","repository":{"id":57551764,"uuid":"309740049","full_name":"Foxcapades/go-bytify","owner":"Foxcapades","description":"Simple lib for writing typed values to byte buffers.","archived":false,"fork":false,"pushed_at":"2021-02-01T23:43:34.000Z","size":1279,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-12T17:19:20.977Z","etag":null,"topics":["buffer","bytes","go","golang","library"],"latest_commit_sha":null,"homepage":"","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/Foxcapades.png","metadata":{"files":{"readme":"readme.adoc","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-11-03T16:10:41.000Z","updated_at":"2021-02-05T18:36:29.000Z","dependencies_parsed_at":"2022-09-20T12:52:23.228Z","dependency_job_id":null,"html_url":"https://github.com/Foxcapades/go-bytify","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Foxcapades%2Fgo-bytify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Foxcapades%2Fgo-bytify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Foxcapades%2Fgo-bytify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Foxcapades%2Fgo-bytify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Foxcapades","download_url":"https://codeload.github.com/Foxcapades/go-bytify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478234,"owners_count":20945262,"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":["buffer","bytes","go","golang","library"],"created_at":"2024-10-09T21:09:09.469Z","updated_at":"2025-10-03T16:18:27.576Z","avatar_url":"https://github.com/Foxcapades.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Go Bytify\n\nimage:https://img.shields.io/github/v/tag/foxcapades/go-bytify[GitHub tag (latest SemVer)]\nimage:https://img.shields.io/github/go-mod/go-version/foxcapades/go-bytify[GitHub go.mod Go version]\nimage:https://img.shields.io/github/license/foxcapades/go-bytify[GitHub]\nimage:https://img.shields.io/badge/api-docs-ff69b4[title=\"API Docs\", link=https://pkg.go.dev/github.com/foxcapades/go-bytify/v0/bytify]\nimage:https://github.com/Foxcapades/go-bytify/workflows/Go/badge.svg[Go]\nimage:https://codecov.io/gh/Foxcapades/go-bytify/branch/main/graph/badge.svg?token=E4WD9IURJL[title=codecov, link=https://codecov.io/gh/Foxcapades/go-bytify]\n\nA dead simple library for writing various types to byte buffers.\n\nBytify is intended for those who pursue senseless, borderline silly\nmicro-optimizations. If that's not you, consider using the standard library's\n`strconv.Append*()` functions instead.\n\nBytify also has no dependencies on any outside or standard library packages, so\nyou can soak up that minimized assembly while you revel in the nanoseconds that\nyou're saving.\n\n== Usage\n\n.Install\n[source,sh-session]\n----\n$ go get github.com/foxcapades/go-bytify/v0/bytify\n----\n\n.Example Usage\n[source,go]\n----\npackage main\n\nimport (\n  \"fmt\"\n  \"github.com/foxcapades/go-bytify/v0/bytify\"\n)\n\nfunc main() {\n  value := uint64(123_456_789_123)\n  buf := make([]byte, bytify.Uint64StringSize(value))\n  bytify.Uint64ToBytes(value, buf)\n\n  fmt.Println(string(buf)) // 123456789123\n}\n----\n\n== Benchmarks\n\nBenchmark output is stored in `docs/benchmarks`. each file was generated by the\nbenchmark script `\\{version}/tools/bench/\\{type}/main.go`.\n\nThe cycles/iterations used is 100 cycles of 10,000,000 iterations each (meaning\n1 billion calls to each of the `bytify` and `strconv` functions).\n\n== Change Log\n\nOnly the last 3 releases will be shown here.  For further info see the\nlink:docs/releases.txt[`docs/releases.txt`] file.\n\n`v0.3.0`::\nAdded the following feature complete methods with full test coverage:\n+\n.Serialization Methods\n[cols=\"1m,4m\",options=\"header\"]\n|===\n| Type | Functions\n| int8 | Int8ToBytes(int8, []byte) uint8\n\nInt8ToBuf(int8, io.Writer) uint8\n\nInt8ToByteSlice(int8) []byte\n| int16 | Int16ToBytes(int16, []byte) uint8\n\nInt16ToBuf(int16, io.Writer) uint8\n\nInt16ToByteSlice(int16) []byte\n| int32 | Int32ToBytes(int32, []byte) uint8\n\nInt32ToBuf(int32, io.Writer) uint8\n\nInt32ToByteSlice(int32) []byte\n| int64 | Int64ToBytes(int64, []byte) uint8\n\nInt64ToBuf(int64, io.Writer) uint8\n\nInt64ToByteSlice(int64) []byte\n|===\n+\n.Sizing Methods\n[cols=\"1m,4m\",options=\"header\"]\n|===\n| Type  | Functions\n| int8  | Int8StringSize(int8) uint8\n| int16 | Int16StringSize(int16) uint8\n| int32 | Int32StringSize(int32) uint8\n| int64 | Int64StringSize(int64) uint8\n|===\n\nThere will be no breaking changes to these functions before v2.0.0 is released.\n\n`v0.2.0`::\nAdded the following feature complete methods with full test coverage:\n+\n.Serialization Methods\n[cols=\"1m,4m\",options=\"header\"]\n|===\n| Type | Functions\n| uint8 | Uint8ToByteSlice(uint8) []byte\n| uint16 | Uint16ToByteSlice(uint16) []byte\n| uint32 | Uint32ToByteSlice(uint32) []byte\n| uint64 | Uint64ToByteSlice(uint64) []byte\n|===\n\nThere will be no breaking changes to these functions before v2.0.0 is released.\n\n`v0.1.0`::\nAdded the following feature complete methods with full test coverage:\n+\n.Serialization Methods\n[cols=\"1m,4m\",options=\"header\"]\n|===\n| Type | Functions\n| uint8 | Uint8ToBytes(uint8, []byte) uint8\n\nUint8ToBuf(uint8, io.Writer) uint8\n| uint16 | Uint16ToBytes(uint16, []byte) uint8\n\nUint16ToBuf(uint16, io.Writer) uint8\n| uint32 | Uint32ToBytes(uint32, []byte) uint8\n\nUint32ToBuf(uint32, io.Writer) uint8\n| uint64 | Uint64ToBytes(uint64, []byte) uint8\n\nUint64ToBuf(uint64, io.Writer) uint8\n|===\n+\n.Sizing Methods\n[cols=\"1m,4m\",options=\"header\"]\n|===\n| Type   | Functions\n| uint8  | Uint8StringSize(uint8) uint8\n| uint16 | Uint16StringSize(uint16) uint8\n| uint32 | Uint32StringSize(uint32) uint8\n| uint64 | Uint64StringSize(uint64) uint8\n|===\n+\nThere will be no breaking changes to these functions before `v2.0.0` is released.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxcapades%2Fgo-bytify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoxcapades%2Fgo-bytify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxcapades%2Fgo-bytify/lists"}