{"id":13525111,"url":"https://github.com/jomaway/typst-bytefield","last_synced_at":"2026-01-27T00:37:56.563Z","repository":{"id":188068395,"uuid":"654631324","full_name":"jomaway/typst-bytefield","owner":"jomaway","description":"A typst package for creating diagrams of network protocols, memory layouts, register definitions or similar structures.","archived":false,"fork":false,"pushed_at":"2025-02-20T19:48:10.000Z","size":1252,"stargazers_count":83,"open_issues_count":10,"forks_count":10,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-27T08:53:01.919Z","etag":null,"topics":["bytefield","diagrams","typst-package"],"latest_commit_sha":null,"homepage":"","language":"Typst","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/jomaway.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-06-16T14:57:40.000Z","updated_at":"2025-05-15T13:31:06.000Z","dependencies_parsed_at":"2023-08-13T16:12:06.477Z","dependency_job_id":"6b61505d-fe16-484f-ad27-6363148d4eaa","html_url":"https://github.com/jomaway/typst-bytefield","commit_stats":null,"previous_names":["jomaway/typst-bytefield"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/jomaway/typst-bytefield","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jomaway%2Ftypst-bytefield","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jomaway%2Ftypst-bytefield/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jomaway%2Ftypst-bytefield/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jomaway%2Ftypst-bytefield/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jomaway","download_url":"https://codeload.github.com/jomaway/typst-bytefield/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jomaway%2Ftypst-bytefield/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28793947,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T21:49:50.245Z","status":"ssl_error","status_checked_at":"2026-01-26T21:48:29.455Z","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":["bytefield","diagrams","typst-package"],"created_at":"2024-08-01T06:01:16.069Z","updated_at":"2026-01-27T00:37:56.547Z","avatar_url":"https://github.com/jomaway.png","language":"Typst","funding_links":[],"categories":["Templates \u0026 Libraries","Typst"],"sub_categories":["Engineering"],"readme":"# typst-bytefield \n\nA simple way to create network protocol headers, memory maps, register definitions and more in typst.\n\n⚠️ Warning. As this package is still in an early stage, things might break with the next version.\n\nℹ️ If you find a bug or a feature which is missing, please open an issue and/or send an PR.\n\n## Example\n\n![random colored bytefield example](docs/bytefield_example.png)\n\n```typst\n#import \"@preview/bytefield:0.0.7\": *\n\n#bytefield(\n// Config the header\nbitheader(\n\"bytes\",\n// adds every multiple of 8 to the header.\n0, [start], // number with label\n5,\n// number without label\n12, [#text(14pt, fill: red, \"test\")],\n23, [end_test],\n24, [start_break],\n36, [Fix], // will not be shown\nangle: -50deg, // angle (default: -60deg)\ntext-size: 8pt, // length (default: global header_font_size or 9pt)\n),\n// Add data fields (bit, bits, byte, bytes) and notes\n// A note always aligns on the same row as the start of the next data field.\nnote(left)[#text(16pt, fill: blue, \"Testing\")],\nbytes(3,fill: red.lighten(30%))[Test],\nnote(right)[#set text(9pt); #sym.arrow.l This field \\ breaks into 2 rows.],\nbytes(2)[Break],\nnote(left)[#set text(9pt); and continues \\ here #sym.arrow],\nbits(24,fill: green.lighten(30%))[Fill],\ngroup(right,3)[spanning 3 rows],\nbytes(12)[#set text(20pt); *Multi* Row],\nnote(left, bracket: true)[Flags],\nbits(4)[#text(8pt)[reserved]],\nflag[#text(8pt)[SYN]],\nflag(fill: orange.lighten(60%))[#text(8pt)[ACK]],\nflag[#text(8pt)[BOB]],\nbits(25, fill: purple.lighten(60%))[Padding],\n// padding(fill: purple.lighten(40%))[Padding],\nbytes(2)[Next],\nbytes(8, fill: yellow.lighten(60%))[Multi break],\nnote(right)[#emoji.checkmark Finish],\nbytes(2)[_End_],\n)\n```\n\n\n## Usage\n\nTo use this library through the Typst package manager import bytefield with `#import \"@preview/bytefield:0.0.7\": *` at the top of your file.\n\nThe package contains some of the most common network protocol headers which are available under: `common.ipv4`, `common.ipv6`, `common.icmp`, `common.icmpv6`, `common.dns`, `common.tcp`, `common.udp`.\n\n## Features\n\nHere is a unsorted list of features which is possible right now.\n\n- Adding fields with `bit`, `bits`, `byte` or `bytes` function.\n  - Fields can be colored\n  - Multirow and breaking fields are supported.\n- Adding notes to the left or right with `note` or `group` function.\n- Config the header with the `bitheader` function. !Only one header per bytefield is processed currently.\n  - Show numbers\n  - Show numbers and labels\n  - Show only labels\n- Change the bit order in the header with `msb:left` or `msb:right` (default)\n\n\nSee [example.typ](example.typ) for more information.\n\n# Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjomaway%2Ftypst-bytefield","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjomaway%2Ftypst-bytefield","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjomaway%2Ftypst-bytefield/lists"}