{"id":21994241,"url":"https://github.com/jhuix/librarres","last_synced_at":"2025-07-21T21:37:03.888Z","repository":{"id":97493552,"uuid":"163281791","full_name":"jhuix/librarres","owner":"jhuix","description":"The librarres project is a library that reads RAR compressed files as resource packages.","archived":false,"fork":false,"pushed_at":"2019-01-21T03:26:04.000Z","size":316,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T04:13:23.068Z","etag":null,"topics":["jres","librarres","rar","rarres","res","unrar"],"latest_commit_sha":null,"homepage":null,"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/jhuix.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":"2018-12-27T10:35:55.000Z","updated_at":"2024-10-28T02:19:40.000Z","dependencies_parsed_at":"2023-03-30T11:49:52.813Z","dependency_job_id":null,"html_url":"https://github.com/jhuix/librarres","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jhuix/librarres","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuix%2Flibrarres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuix%2Flibrarres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuix%2Flibrarres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuix%2Flibrarres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhuix","download_url":"https://codeload.github.com/jhuix/librarres/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuix%2Flibrarres/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266384371,"owners_count":23921037,"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-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["jres","librarres","rar","rarres","res","unrar"],"created_at":"2024-11-29T21:08:05.736Z","updated_at":"2025-07-21T21:37:03.870Z","avatar_url":"https://github.com/jhuix.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Librarres\r\n=============\r\n\r\nlibrarres 工程是一读取由RAR压缩文件做为资源包的库。\r\n\r\n## UnRAR\r\n\r\nRAR文件分析和解压缩采用 [www.rarlab.com](https://www.rarlab.com) 的解压缩[UnRAR 5.6.8](https://www.rarlab.com/rar/unrarsrc-5.6.8.tar.gz)开源版本源码, 该部分源码请遵守它相关的开源许可。\r\n\r\n## Example\r\n\r\n#### 1. 获取一个test.rar资源包里的名为\"skin\\\\ui\\\\index.html\"的内容至缓存中:\r\n\r\n```\r\nJRES::IRes* rarres = JRES::CreateRarRes(true);\r\nif (rarres) {\r\n    if (rarres-\u003eOpen(\"test.rar\", 0)) {\r\n        char* buf = nullptr;\r\n        size_t bufsize = 0;\r\n        void* res = rarres-\u003eLoadResource(\"skin\\\\ui\\\\index.html\", \u0026buf, bufsize);\r\n        if (res) {\r\n            //TO DO USE data of \"buf\"\r\n            rarres-\u003eFreeResource(res);\r\n        }\r\n    }\r\n    rarres-\u003eRelease();\r\n}\r\n```\r\n\r\n#### 2. 在windows平台下，获取一个test.rar资源包里的名为\"skin/img/caotion.png\"的内容至IStream中:\r\n\r\n```\r\nJRES::IRes* rarres = JRES::CreateRarRes(false);\r\nif (rarres) {\r\n    if (rarres-\u003eOpen(\"test.rar\", '/')) {\r\n        IStream* res = rarres-\u003eLoadResource(\"skin/img/caotion.png\");\r\n        if (res) {\r\n            //TO DO USE IStream interface methods of \"res\";\r\n            //For examples: \u003cSeek\u003e|\u003cRead\u003e|\u003cWrite\u003e methods etc.\r\n            res-\u003eRelease();\r\n        }\r\n    }\r\n    rarres-\u003eRelease();\r\n}\r\n```\r\n\r\n## License\r\n\r\n[MIT](http://opensource.org/licenses/MIT)\r\n\r\nCopyright (c) 2018-present, [Jhuix](mailto:jhuix0117@gmail.com) (Hui Jin)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhuix%2Flibrarres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhuix%2Flibrarres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhuix%2Flibrarres/lists"}