{"id":17946581,"url":"https://github.com/sam-peach/simple_slip","last_synced_at":"2025-04-03T14:44:30.601Z","repository":{"id":54205172,"uuid":"522070755","full_name":"sam-peach/simple_slip","owner":"sam-peach","description":"A simple, lightweight implementation SLIP encoding for Rust!","archived":false,"fork":false,"pushed_at":"2022-09-01T23:50:37.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-23T17:53:33.527Z","etag":null,"topics":["encoding","rust","serial","slip"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/sam-peach.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}},"created_at":"2022-08-06T22:56:45.000Z","updated_at":"2023-05-02T10:33:34.000Z","dependencies_parsed_at":"2022-08-13T09:10:37.134Z","dependency_job_id":null,"html_url":"https://github.com/sam-peach/simple_slip","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/sam-peach%2Fsimple_slip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sam-peach%2Fsimple_slip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sam-peach%2Fsimple_slip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sam-peach%2Fsimple_slip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sam-peach","download_url":"https://codeload.github.com/sam-peach/simple_slip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247024066,"owners_count":20870935,"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":["encoding","rust","serial","slip"],"created_at":"2024-10-29T07:06:32.729Z","updated_at":"2025-04-03T14:44:30.573Z","avatar_url":"https://github.com/sam-peach.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple SLIP\n\nA simple, lightweight implementation of [RFC 1055](https://tools.ietf.org/html/rfc1055) SLIP encoding for Rust!\n\n## What is SLIP encoding?\n\nSLIP (serial line internet protocol) encoding is a very simple way of packaging so it can be transmitted to some other receiver. I'd highly recommend reading the [Wikipedia article](https://en.wikipedia.org/wiki/Serial_Line_Internet_Protocol) on the topic for some more insight!\n\n## Examples\n\nSLIP is used in encoding data to be sent and decoding data to be read.\n\n### Encoding\n\n**NOTE: Each packet will _start_ and _end_ with an `END` (0xC0) byte.**\n\n```rust\nuse simple_slip::encode;\n\nlet input: Vec\u003cu8\u003e = vec![0x01, 0xDB, 0x49, 0xC0, 0x15];\nlet expected: Vec\u003cu8\u003e = vec![0xC0, 0x01, 0xDB, 0xDD, 0x49, 0xDB, 0xDC, 0x15, 0xC0];\n\nlet result: Vec\u003cu8\u003e = encode(\u0026input).unwrap();\n\nassert_eq!(result, expected);\n```\n\n### Decoding\n\n**NOTE: Each packet will start decoding from the second occurrence of the `END` (0xC0) byte.**\n\n**The following data array would only decode `0x01` as it's the only byte after the second `END` (0xC0) byte:**\n\n```\n[0xA1, 0xA2, 0xA3, 0xC0, 0xC0, 0x01] --decode--\u003e [0x01]\n```\n\n```rust\nuse simple_slip::decode;\n\nlet input: Vec\u003cu8\u003e = vec![0xA1, 0xA2, 0xA3, 0xC0, 0xC0, 0x01, 0xDB, 0xDD, 0x49, 0xDB, 0xDC, 0x15, 0xC0];\nlet expected: Vec\u003cu8\u003e = vec![0x01, 0xDB, 0x49, 0xC0, 0x15];\n\nlet result: Vec\u003cu8\u003e = decode(\u0026input).unwrap();\n\nassert_eq!(result, expected);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsam-peach%2Fsimple_slip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsam-peach%2Fsimple_slip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsam-peach%2Fsimple_slip/lists"}