{"id":20058620,"url":"https://github.com/tlewin/ruby-uriparser","last_synced_at":"2025-07-26T13:38:27.013Z","repository":{"id":14994987,"uuid":"17720318","full_name":"tlewin/ruby-uriparser","owner":"tlewin","description":"Super fast Ruby URI parser, built on top of C library uriparser.","archived":false,"fork":false,"pushed_at":"2021-03-25T20:51:01.000Z","size":30,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-05T19:49:00.551Z","etag":null,"topics":["fast","uri","uri-parser"],"latest_commit_sha":null,"homepage":"","language":"C","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/tlewin.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","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":"2014-03-13T17:50:28.000Z","updated_at":"2021-03-25T20:51:04.000Z","dependencies_parsed_at":"2022-08-30T08:01:12.116Z","dependency_job_id":null,"html_url":"https://github.com/tlewin/ruby-uriparser","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/tlewin/ruby-uriparser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlewin%2Fruby-uriparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlewin%2Fruby-uriparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlewin%2Fruby-uriparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlewin%2Fruby-uriparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tlewin","download_url":"https://codeload.github.com/tlewin/ruby-uriparser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlewin%2Fruby-uriparser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267175741,"owners_count":24047920,"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","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["fast","uri","uri-parser"],"created_at":"2024-11-13T13:02:28.465Z","updated_at":"2025-07-26T13:38:26.943Z","avatar_url":"https://github.com/tlewin.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ruby-uriparser\n\n[![Gem Version](https://badge.fury.io/rb/ruby-uriparser.svg)](https://badge.fury.io/rb/ruby-uriparser)\n[![Build Status](https://travis-ci.org/tlewin/ruby-uriparser.svg?branch=master)](https://travis-ci.org/tlewin/ruby-uriparser)\n[![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop-hq/rubocop)\n\nRuby-uriparser is a wrapper for [uriparser](http://uriparser.sourceforge.net/) C library which is fast (linear input length time complexity), approximatelly 7.5x faster than the standard ruby URI library with a low memory consumption.\n\nIt is a fairly reasonable hypothesis to consider that __all__ Ruby Rack applications will call, at least once, the `URI.parse` method for each http request, so this simple optimization can bring a significant impact on a high load environment. (See Benchmark)\n\n## Usage\n\n```ruby\nrequire 'uriparser'\n\nUriParser.parse('https://localhost:9000/path/?a=1#x') # return UriParser::URI object\n```\n\nIf you want to override the URI class just include the following line in your code:\n\n```ruby\n# Will override URI#parse and Kernel#URI methods\nrequire 'uriparser/uri_gem'\n```\n\n## Benchmark\n\nThe following numbers were computed for 100,000 `URI.parse` calls using the Ruby 2.6 benchmark library in a Mac OS X (10.15.6)/ 2,7 GHz Dual-Core Intel Core i5/ 16 GB 1867 MHz DDR3:\n\n    # Complex URLs\n    Rehearsal ------------------------------------------------\n    URI            1.139526   0.007341   1.146867 (  1.189431)\n    UriParser      0.148833   0.008094   0.156927 (  0.163185)\n    Addressable    2.096471   0.008317   2.104788 (  2.152700)\n    --------------------------------------- total: 3.408582sec\n\n                    user     system      total        real\n    URI            1.131435   0.007336   1.138771 (  1.215291)\n    UriParser      0.202037   0.005046   0.207083 (  0.259723)\n    Addressable    2.393879   0.019947   2.413826 (  2.676498)\n\n    # Simple URLs\n    Rehearsal ------------------------------------------------\n    URI            0.623932   0.002970   0.626902 (  0.641151)\n    UriParser      0.145798   0.005798   0.151596 (  0.162660)\n    Addressable    2.222884   0.025276   2.248160 (  2.511593)\n    --------------------------------------- total: 3.026658sec\n\n                    user     system      total        real\n    URI            0.702562   0.007480   0.710042 (  0.763542)\n    UriParser      0.153022   0.004182   0.157204 (  0.170975)\n    Addressable    1.879151   0.008923   1.888074 (  1.958248)\n\n## Installation\n\n    gem install ruby-uriparser\n\n## External dependencies\n\nThe ruby-uriparser gems needs the library [uriparser](http://uriparser.sourceforge.net/) installed to compile.\n\nSee the availables ports list: [http://uriparser.sourceforge.net/#ports]().\n\nIf you are on Mac OS X just run `brew install uriparser`.\n\n## License\n\nThis project is released under the MIT license (See LICENSE file).\n\nCopyright (c) 2014 Thiago Lewin - http://github.com/tlewin\n\n## Third party libraries\n\nThis project includes code from the New BSD licensed:\n* Copyright (C) 2007, Weijia Song \u003csongweijia@gmail.com\u003e\n* Copyright (C) 2007, Sebastian Pipping \u003cwebmaster@hartwork.org\u003e\n\nAll rights reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlewin%2Fruby-uriparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftlewin%2Fruby-uriparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlewin%2Fruby-uriparser/lists"}