{"id":18417370,"url":"https://github.com/stellar/escape-bytes","last_synced_at":"2026-02-10T17:05:25.303Z","repository":{"id":210105222,"uuid":"725531898","full_name":"stellar/escape-bytes","owner":"stellar","description":"Escapes bytes that are not printable ASCII characters.","archived":false,"fork":false,"pushed_at":"2024-07-27T06:10:39.000Z","size":18,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-09-25T22:56:06.854Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stellar.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-30T10:43:06.000Z","updated_at":"2025-08-28T23:11:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"e9b0ec52-8952-4f47-a82d-2929b73bf4a9","html_url":"https://github.com/stellar/escape-bytes","commit_stats":null,"previous_names":["stellar/escape-bytes"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/stellar/escape-bytes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fescape-bytes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fescape-bytes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fescape-bytes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fescape-bytes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stellar","download_url":"https://codeload.github.com/stellar/escape-bytes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fescape-bytes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29308964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T16:09:25.305Z","status":"ssl_error","status_checked_at":"2026-02-10T16:08:52.170Z","response_time":65,"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":[],"created_at":"2024-11-06T04:09:04.628Z","updated_at":"2026-02-10T17:05:25.285Z","avatar_url":"https://github.com/stellar.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# escape-bytes\n\nEscapes bytes that are not printable ASCII characters.\n\nThe exact rules are:\n- Nul is escaped as `\\0`.\n- Tab is escaped as `\\t`.\n- Line feed is escaped as `\\n`.\n- Carriage return is escaed as `\\r`.\n- Backslach is escaped as `\\\\`.\n- Any character in the printable ASCII range `0x20`..=`0x7e` is not escaped.\n- Any other character is hex escaped in the form `\\xNN`.\n\nIntended for use where byte sequences are not valid ASCII or UTF-8 but need\nto be stored in a semi-human readable form where only ASCII or UTF-8 are\npermitted.\n\n### Examples\n\n#### Escape\n\n```rust\nlet str = b\"hello\\xc3world\";\nlet escaped = escape_bytes::escape(str);\nassert_eq!(escaped, br\"hello\\xc3world\");\n```\n\n#### Unescape\n\n```rust\nlet escaped = br\"hello\\xc3world\";\nlet unescaped = escape_bytes::unescape(escaped)?;\nassert_eq!(unescaped, b\"hello\\xc3world\");\n```\n\nLicense: Apache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstellar%2Fescape-bytes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstellar%2Fescape-bytes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstellar%2Fescape-bytes/lists"}