{"id":27252296,"url":"https://github.com/niceastvillage/msgpackbf","last_synced_at":"2026-01-23T05:35:49.256Z","repository":{"id":118797744,"uuid":"288722160","full_name":"NicEastvillage/MsgPackBf","owner":"NicEastvillage","description":"A MsgPack library in BeefLang.","archived":false,"fork":false,"pushed_at":"2020-10-14T16:02:52.000Z","size":28,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T01:37:01.447Z","etag":null,"topics":["beef-language","beef-programming-language","msgpack"],"latest_commit_sha":null,"homepage":"","language":"HyPhy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NicEastvillage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-08-19T12:11:05.000Z","updated_at":"2021-12-21T16:43:37.000Z","dependencies_parsed_at":"2023-04-24T21:18:25.594Z","dependency_job_id":null,"html_url":"https://github.com/NicEastvillage/MsgPackBf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NicEastvillage/MsgPackBf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicEastvillage%2FMsgPackBf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicEastvillage%2FMsgPackBf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicEastvillage%2FMsgPackBf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicEastvillage%2FMsgPackBf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NicEastvillage","download_url":"https://codeload.github.com/NicEastvillage/MsgPackBf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicEastvillage%2FMsgPackBf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28680940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T04:33:33.518Z","status":"ssl_error","status_checked_at":"2026-01-23T04:33:30.433Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["beef-language","beef-programming-language","msgpack"],"created_at":"2025-04-11T01:19:50.770Z","updated_at":"2026-01-23T05:35:49.252Z","avatar_url":"https://github.com/NicEastvillage.png","language":"HyPhy","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MsgPackBf\n\nA [MsgPack](https://msgpack.org/) library for [Beef](https://www.beeflang.org/) programming language.\n\nThis library is work in progress.\n\nTODO:\n- Serialization and deserialization using reflection\n- Support for extension types\n- More tests, especially for deserialization\n\n## Repository\n\nIn this repository you will find two folders:\n- `lib` is the MsgPackBf library.\n- `test` is a program to test MsgPackBf.\n\n## How to use MsgPackBf\n\nSerializing an object/map with the following structure `{\"compact\":true,\"schema\":0}`:\n\n```C#\nuint8[] buffer = scope uint8[32];\nMsgPacker packer = scope MsgPacker(buffer);\n\npacker.WriteMapHeader(2);\npacker.Write(\"compact\");\npacker.Write(true);\npacker.Write(\"schema\");\npacker.Write(0);\n```\n\nAfterwards `buffer` will contain your data and `packer.Length` is how many bytes are used.\n\nDeserializing the same object/map:\n\n```C#\nMsgUnpacker unpacker = scope MsgUnpacker(buffer);\n\nlet count = (int)unpacker.ReadMapHeader();\nbool compact;\nint schema;\n\nfor (int i \u003c count)\n{\n\tlet key = scope String();\n\tunpacker.ReadString(key);\n\n\tswitch (key)\n\t{\n\tcase \"compact\":\n\t\tcompact = unpacker.ReadBool().Get();\n\tcase \"schema\":\n\t\tschema = unpacker.ReadInt32().Get();\n\tdefault:\n\t\t// Unknown key\n\t}\n}\n```\n\n## How to get MsgPackBf\n\nTo add MsgPackBf to your project:\n\n1. Clone the MsgPackBf library to a location of your choise.\n1. In Beef IDE, right click on Workspace-\u003eAdd existing project.\n1. Select the `BeefProj.toml` file from the MsgPackBf/lib project.\n1. Open your project's properties. Go to General-\u003eDependencies.\n1. Tick MsgPackBf.\n1. You can now start using the library.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniceastvillage%2Fmsgpackbf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniceastvillage%2Fmsgpackbf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniceastvillage%2Fmsgpackbf/lists"}