{"id":24062328,"url":"https://github.com/shaltielshmid/zimreadersharp","last_synced_at":"2026-02-04T23:37:32.180Z","repository":{"id":204207588,"uuid":"711306309","full_name":"shaltielshmid/ZimReaderSharp","owner":"shaltielshmid","description":"A .NET library designed for streamlined reading and handling of ZIM files.","archived":false,"fork":false,"pushed_at":"2023-11-25T21:18:54.000Z","size":15,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-14T15:55:37.278Z","etag":null,"topics":["wikidump-parser","zim","zimlib"],"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/shaltielshmid.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,"zenodo":null}},"created_at":"2023-10-28T20:45:17.000Z","updated_at":"2024-11-29T10:46:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"b294848f-1a82-4464-b8e4-3418aa6fd5f7","html_url":"https://github.com/shaltielshmid/ZimReaderSharp","commit_stats":null,"previous_names":["shaltielshmid/zimreadersharp"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/shaltielshmid/ZimReaderSharp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaltielshmid%2FZimReaderSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaltielshmid%2FZimReaderSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaltielshmid%2FZimReaderSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaltielshmid%2FZimReaderSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shaltielshmid","download_url":"https://codeload.github.com/shaltielshmid/ZimReaderSharp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaltielshmid%2FZimReaderSharp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000701,"owners_count":26082805,"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-10-08T02:00:06.501Z","response_time":56,"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":["wikidump-parser","zim","zimlib"],"created_at":"2025-01-09T08:39:53.564Z","updated_at":"2025-10-08T19:09:25.614Z","avatar_url":"https://github.com/shaltielshmid.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZimReaderSharp - A .NET library designed for streamlined reading and handling of ZIM files.\n\n[![NuGet](https://img.shields.io/nuget/v/ZimReaderSharp.svg)](https://www.nuget.org/packages/ZimReaderSharp/)\n\n`ZimReaderSharp` provides a streamlined interface to efficiently read and handle ZIM files. With support for multiple compression types—including BZip2, LZMA, and ZStd—this library prioritizes performance, loading only necessary data on-the-fly for rapid startup.\n\n## Installation\n\nTo incorporate ZimReaderSharp into your project, choose one of the following methods:\n\n### .NET CLI\n```bash\ndotnet add package ZimReaderSharp\n```\n\n### NuGet Package Manager\n```powershell\nInstall-Package ZimReaderSharp\n```\n\nFor detailed package information, visit [ZimReaderSharp on NuGet](https://www.nuget.org/packages/ZimReaderSharp/).\n\n## Key Usages\n\nThe main class `ZimFile` offers an interface for accessing all the entries in a given ZIM file. You can either iterate over them, retrieve them by URL or by retrieve them by index. \n\nGiven a returned Entry, it has the following properties:\n\n- `Format`: An object containing all the metadata for a given entry: `Namespace`, `Revision`, `Url`, `Title`, `Parameter`.\n\n- `Index`: The index of the entry in the file.\n\n- `IsRedirect`: If the user requested to not follow redirects, then this flag will be true and data will be null.\n\n- `Data`: A byte[] containing the data of the entry\n\n- `Mime`: A string representation of the mime type. \n\n\n## Sample usage\n\nHere is an example to read all the HTML entries in a given ZIM file: \n\n```cs\nstring filename = \"wikipedia_en_all_nopic_2023-06.zim\";\n\nusing var zimFile = new ZimFile(filename);\n\nforeach (var (index, mime) in zimFile.IterateArticles()) {\n    if (mime == \"text/html\") {\n        var entry = zimFile.GetArticleByIndex(index, fFollowRedirect: false);\n        if (entry.IsRedirect) continue;\n\n        string html = Encoding.UTF8.GetString(entry.Data);\n    }\n}\n```\n\nOr, here is an example to get an entry by a URL:\n\n```cs\nstring filename = \"wikipedia_en_all_nopic_2023-06.zim\";\n\nusing var zimFile = new ZimFile(filename);\n\nvar entry = zimFile.GetEntryByUrl('A', \"some_url\");\nConsole.WriteLine(entry.Format.Title);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaltielshmid%2Fzimreadersharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshaltielshmid%2Fzimreadersharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaltielshmid%2Fzimreadersharp/lists"}