{"id":20550270,"url":"https://github.com/dnmfarrell/uri-encode-c","last_synced_at":"2025-04-14T11:17:00.214Z","repository":{"id":45135190,"uuid":"59438057","full_name":"dnmfarrell/URI-Encode-C","owner":"dnmfarrell","description":"C library for URI percent encoding/decoding","archived":false,"fork":false,"pushed_at":"2022-01-01T12:00:28.000Z","size":11,"stargazers_count":14,"open_issues_count":2,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-04-01T08:53:40.781Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dnmfarrell.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}},"created_at":"2016-05-22T22:52:37.000Z","updated_at":"2022-12-07T05:33:20.000Z","dependencies_parsed_at":"2022-07-21T06:32:33.524Z","dependency_job_id":null,"html_url":"https://github.com/dnmfarrell/URI-Encode-C","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnmfarrell%2FURI-Encode-C","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnmfarrell%2FURI-Encode-C/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnmfarrell%2FURI-Encode-C/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnmfarrell%2FURI-Encode-C/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnmfarrell","download_url":"https://codeload.github.com/dnmfarrell/URI-Encode-C/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224867844,"owners_count":17383101,"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":[],"created_at":"2024-11-16T02:24:09.625Z","updated_at":"2024-11-16T02:24:10.809Z","avatar_url":"https://github.com/dnmfarrell.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"encode_uri\n==========\nAn optimized C library for percent encoding/decoding text\n\nDescription\n-----------\nThis is a URI encoder/decoder written in C based on [RFC3986](https://tools.ietf.org/html/rfc3986).\nThis module always encodes characters that are not unreserved. When decoding,\ninvalid escape sequences are preserved.\n\nThe code is optimized for speed and has a reasonable test suite. It will also\nencode and decode null bytes in the middle of strings (assuming you calculated\nthe string length correctly!).\n\nSynopsis\n--------\n\n    #include \u003cstdlib.h\u003e\n    #include \u003cstring.h\u003e\n    #include \u003curi_encode.h\u003e\n\n    /* encode text */\n    const char *uri = \"Some data!That Needs Encoding/\";\n    size_t len = strlen(uri);\n    char buffer[ calc_buffer_size(uri) ];\n    buffer[0] = '\\0';\n    uri_encode(uri, len, buffer);\n\n    /* decode text */\n    const char *encoded_uri = \"Some%20data%21That%20Needs%20Decoding%2F\";\n    size_t len = strlen(encoded_uri);\n    char decoded_uri[ len + 1 ];\n    decoded_uri[0] = '\\0';\n    uri_decode(encoded_uri, len, decoded_uri);\n\nInstallation\n------------\n\nBuilds, tests and installs a static library: `liburi_encode.a`\n\n    clone https://github.com/dnmfarrell/Encode-URI-C.git\n    cd Encode-URI-C\n    make\n    make test\n    sudo make install\n\nTo install to a custom location, edit `DESTDIR` and `PREFIX` in `Makefile`.\n\nUninstallation\n--------------\n\n    sudo make uninstall\n\nSee Also\n--------\n* [URI-Encode-XS](https://github.com/dnmfarrell/URI-Encode-XS) is a Perl XS module\nthat uses the same C code.\n* My article about the C code: [The road to a 55x speedup with XS](http://perltricks.com/article/the-road-to-a-55x-speedup-with-xs/)\n\nAuthors\n-------\n\u0026copy; 2016\n\n* [David Farrell](https://github.com/dnmfarrell)\n* [Aristotle Pagaltzis](https://github.com/ap)\n* [Christian Hansen](https://github.com/chansen)\n* [Jesse DuMond](https://github.com/JesseCanary)\n\nVersion\n-------\n0.03\n\nLicense\n-------\nSee LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnmfarrell%2Furi-encode-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnmfarrell%2Furi-encode-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnmfarrell%2Furi-encode-c/lists"}