{"id":21994243,"url":"https://github.com/jhuix/lib7zres","last_synced_at":"2025-03-23T04:13:27.599Z","repository":{"id":97493543,"uuid":"163475472","full_name":"jhuix/lib7zres","owner":"jhuix","description":"The lib7zres project is a library that reads 7z compressed files as resource packages.","archived":false,"fork":false,"pushed_at":"2019-01-21T03:36:42.000Z","size":1896,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-28T10:35:45.754Z","etag":null,"topics":["7z","7zip","7zres","lib7zres","lzma","lzma2","res","sevenzip"],"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/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-29T04:22:50.000Z","updated_at":"2021-09-06T02:28:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb81d308-96a0-4def-94be-73f903fa04b3","html_url":"https://github.com/jhuix/lib7zres","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuix%2Flib7zres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuix%2Flib7zres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuix%2Flib7zres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhuix%2Flib7zres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhuix","download_url":"https://codeload.github.com/jhuix/lib7zres/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245052673,"owners_count":20553172,"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":["7z","7zip","7zres","lib7zres","lzma","lzma2","res","sevenzip"],"created_at":"2024-11-29T21:08:06.187Z","updated_at":"2025-03-23T04:13:27.577Z","avatar_url":"https://github.com/jhuix.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Lib7zres\r\n=============\r\n\r\nlib7zres 工程是一读取由7z压缩文件做为资源包的库。\r\n\r\n## 7z-LZMA SDK \r\n\r\n7z文件分析和解压缩采用 [7Zip](https://www.7-zip.org) 的解压缩[LZMA SDK](https://www.7-zip.org/sdk.html)开源版本源码。\r\n\r\n## Example\r\n\r\n#### 1. 获取一个test.7z资源包里的名为\"skin\\\\ui\\\\index.html\"的内容至缓存中:\r\n\r\n```\r\nJRES::IRes* jres = SEVENZRES::Create7zRes(true);\r\nif (jres) {\r\n    if (jres-\u003eOpen(\"test.7z\", '\\\\')) {\r\n        char* buf = nullptr;\r\n        size_t bufsize = 0;\r\n        void* res = jres-\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    jres-\u003eRelease();\r\n}\r\n```\r\n\r\n#### 2. 在windows平台下，获取一个test.7z\"skin/img/caotion.png\"的内容至IStream中:\r\n\r\n```\r\nJRES::IRes* jres = SEVENZRES::Create7zRes(true);\r\nif (jres) {\r\n    if (jres-\u003eOpen(\"test.7z\", 0)) {\r\n        IStream* res = jres-\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    jres-\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)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhuix%2Flib7zres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhuix%2Flib7zres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhuix%2Flib7zres/lists"}