{"id":13499793,"url":"https://github.com/openzim/libzim","last_synced_at":"2026-04-02T15:10:59.271Z","repository":{"id":19680320,"uuid":"87638778","full_name":"openzim/libzim","owner":"openzim","description":"Reference implementation of the ZIM specification","archived":false,"fork":false,"pushed_at":"2026-02-03T16:16:48.000Z","size":31605,"stargazers_count":222,"open_issues_count":77,"forks_count":65,"subscribers_count":17,"default_branch":"main","last_synced_at":"2026-02-04T06:04:30.311Z","etag":null,"topics":["compression","file-format","kiwix","offline","openzim","zim"],"latest_commit_sha":null,"homepage":"https://download.openzim.org/release/libzim/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openzim.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":".github/FUNDING.yml","license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"kiwix","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2017-04-08T14:15:14.000Z","updated_at":"2026-02-03T16:16:52.000Z","dependencies_parsed_at":"2023-01-13T20:31:14.779Z","dependency_job_id":"74358234-e05c-4b58-887a-23f11d4308f0","html_url":"https://github.com/openzim/libzim","commit_stats":{"total_commits":1298,"total_committers":31,"mean_commits":41.87096774193548,"dds":0.4684129429892142,"last_synced_commit":"6e31b4b9978279e670897f8827539515f10588e7"},"previous_names":[],"tags_count":57,"template":false,"template_full_name":null,"purl":"pkg:github/openzim/libzim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openzim%2Flibzim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openzim%2Flibzim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openzim%2Flibzim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openzim%2Flibzim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openzim","download_url":"https://codeload.github.com/openzim/libzim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openzim%2Flibzim/sbom","scorecard":{"id":1238007,"data":{"date":"2025-09-22T15:06:41Z","repo":{"name":"github.com/openzim/libzim","commit":"0db02951c6c7ffd5f835b9fdfdecd4fed5526d85"},"scorecard":{"version":"v5.1.1","commit":"cd152cb6742c5b8f2f3d2b5193b41d9c50905198"},"score":6.3,"checks":[{"name":"Maintained","score":10,"reason":"12 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":5,"reason":"Found 4/7 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/package.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":9,"reason":"dependency not pinned by hash detected -- score normalized to 9","details":["Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:63","Info:  10 out of  10 GitHub-owned GitHubAction dependencies pinned","Info:  16 out of  16 third-party GitHubAction dependencies pinned","Info:   0 out of   1 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#vulnerabilities"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#cii-best-practices"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: all commits (30) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#sast"}},{"name":"Dependency-Update-Tool","score":0,"reason":"no update tool detected","details":["Warn: no dependency update tool configurations found"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#dependency-update-tool"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: COPYING:0","Info: FSF or OSI recognized license: GNU General Public License v2.0: COPYING:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#license"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#fuzzing"}},{"name":"CI-Tests","score":10,"reason":"7 out of 7 merged PRs checked by a CI test -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#ci-tests"}},{"name":"Contributors","score":10,"reason":"project has 27 contributing companies or organizations","details":["Info: found contributions from: 7ay, HumanESDES, WPAFC, codeafrica, codeursml, frc604, freedomofpress, ideascube, jokkolabs, jubako, kiwix, kiwix @openzim, kymeria, mvpdev, offspot, opendatamali, openzim, pywikibot, rapidsms, resapac, toolforge, uncyclomedia, wiki-ai, wikimedia, wikimedia foundation, yeleman, yɛlɛman"],"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/cd152cb6742c5b8f2f3d2b5193b41d9c50905198/docs/checks.md#contributors"}}]},"last_synced_at":"2025-09-22T17:22:47.513Z","repository_id":19680320,"created_at":"2025-09-22T17:22:47.536Z","updated_at":"2025-09-22T17:22:47.536Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29157480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T07:18:23.844Z","status":"ssl_error","status_checked_at":"2026-02-06T07:13:32.659Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["compression","file-format","kiwix","offline","openzim","zim"],"created_at":"2024-07-31T22:00:42.457Z","updated_at":"2026-02-06T10:04:33.454Z","avatar_url":"https://github.com/openzim.png","language":"C++","funding_links":["https://github.com/sponsors/kiwix"],"categories":["C++"],"sub_categories":[],"readme":"Libzim\n======\n\nThe Libzim is the reference implementation for the [ZIM file\nformat](https://wiki.openzim.org/wiki/ZIM_file_format). It's a [software\nlibrary](https://en.wikipedia.org/wiki/Library_(computing)) to read\nand write ZIM files on many systems and architectures. More\ninformation about the ZIM format and the openZIM project at\nhttps://openzim.org/.\n\n[![Release](https://img.shields.io/github/v/tag/openzim/libzim?label=release\u0026sort=semver)](https://download.openzim.org/release/libzim/)\n[![Repositories](https://img.shields.io/repology/repositories/libzim?label=repositories)](https://github.com/openzim/libzim/wiki/Repology)\n[![macOS Homebrew](https://badgen.net/homebrew/v/libzim)](https://formulae.brew.sh/formula/libzim)\n[![License](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)\n[![CI](https://github.com/openzim/libzim/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/openzim/libzim/actions/workflows/ci.yml?query=branch%3Amain)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/openzim/libzim/badge)](https://securityscorecards.dev/viewer/?uri=github.com/openzim/libzim)\n[![Doc](https://readthedocs.org/projects/libzim/badge/?style=flat)](https://libzim.readthedocs.io/en/latest/?badge=latest)\n[![Codecov](https://codecov.io/gh/openzim/libzim/branch/main/graph/badge.svg)](https://codecov.io/gh/openzim/libzim)\n[![CodeFactor](https://www.codefactor.io/repository/github/openzim/libzim/badge)](https://www.codefactor.io/repository/github/openzim/libzim)\n\nDisclaimer\n----------\n\nThis document assumes you have a little knowledge about software\ncompilation. If you experience difficulties with the dependencies or\nwith the Libzim compilation itself, we recommend to have a look to\n[kiwix-build](https://github.com/kiwix/kiwix-build).\n\nUsage\n-----\n\nBeside the source code, compiled versions of the libzim are made\n[available for various\nplatforms](https://download.openzim.org/release/libzim/).\n\nPlease notice that on Microsoft Windows with Microsoft compiler, you\nneed to be careful to not compile in debug mode (because our released\nbinaries are not).\n\nPreamble\n--------\n\nAlthough the Libzim can be compiled/cross-compiled on/for many\nsystems, the following documentation explains how to do it on POSIX\nones. It is primarily though for GNU/Linux systems and has been tested\non recent releases of Ubuntu and Fedora.\n\nDependencies\n------------\n\nThe Libzim relies on many third party software libraries. They are\nprerequisites to the Kiwix library compilation. Following libraries\nneed to be available:\n* [LZMA](https://tukaani.org/lzma/) (package `liblzma-dev` on Ubuntu)\n* [ICU](http://site.icu-project.org/) (package `libicu-dev` on Ubuntu)\n* [Zstd](https://facebook.github.io/zstd/) (package `libzstd-dev` on Ubuntu)\n* [Xapian](https://xapian.org/) - optional (package `libxapian-dev` on Ubuntu)\n\nTo test the code:\n* [Google Test](https://github.com/google/googletest) (package `googletest` on Ubuntu)\n* [ZIM Testing Suite](https://github.com/openzim/zim-testing-suite) - Reference test data set\n\nTo build the documentations you need the packages:\n* [Doxygen](https://www.doxygen.nl)\n* Python packages for [Sphinx](https://www.sphinx-doc.org), [Sphinx rtd theme](https://github.com/readthedocs/sphinx_rtd_theme), [Breathe](https://breathe.readthedocs.io) and [Exhale](https://exhale.readthedocs.io) (packages `Sphinx`, `sphinx_rtd_theme`, `Breathe` and `Exhale` while using pip)\n\nThese dependencies may or may not be packaged by your operating\nsystem. They may also be packaged but only in an older version. The\ncompilation script will tell you if one of them is missing or too old.\nIn the worse case, you will have to download and compile a more recent\nversion by hand.\n\nIf you want to install these dependencies locally, then ensure that\nMeson (through `pkg-config`) will properly find them.\n\nEnvironment\n-------------\n\nThe Libzim builds using [Meson](https://mesonbuild.com/) version\n0.43 or higher. Meson relies itself on Ninja, Pkg-config and few other\ncompilation tools. Install them first:\n* Meson\n* Ninja\n* Pkg-config\n\nThese tools should be packaged if you use a cutting edge operating\nsystem. If not, have a look to the [Troubleshooting](#Troubleshooting)\nsection.\n\nCompilation\n-----------\n\nOnce all dependencies are installed, you can compile Libzim with:\n```bash\nmeson . build\nninja -C build\n```\n\nBy default, it will compile dynamic linked libraries. All binary files\nwill be created in the `build` directory created automatically by\nMeson. If you want statically linked libraries, you can add\n`--default-library=static` option to the Meson command.\n\nIf you want to build the documentation, we need to pass the\n`-Ddoc=true` option and run the `doc` target:\n```bash\nmeson . build -Ddoc=true\nninja -C build doc\n```\n\nDepending on your system, `ninja` command may be called `ninja-build`.\n\nBy default, Libzim tries to compile with Xapian (and will generate an\nerror if Xapian is not found).  You can build without Xapian by\npassing the option `-Dwith_xapian=false` :\n```bash\nmeson . build -Dwith_xapian=false\nninja -C build doc\n```\n\nIf Libzim is compiled without Xapian, all search API are removed.  You\ncan test if an installed version of Libzim is compiled with or without\nxapian by testing the define `LIBZIM_WITH_XAPIAN`.\n\nTesting\n-------\n\nZIM files needed by unit-tests are not included in this repository. By\ndefault, Meson will use an internal directory in your build directory,\nbut you can specify another directory with option `test_data_dir`:\n```bash\nmeson . build -Dtest_data_dir=\u003cA_DIR_WITH_TEST_DATA\u003e\n```\n\nWhatever you specify a directory or not, you need a extra step to\ndownload the data. At choice:\n* Get the data from the repository\n  [openzim/zim-testing-suite](https://github.com/openzim/zim-testing-suite)\n  and put it yourself in the directory.\n* Use the script\n  [download_test_data.py](scripts/download_test_data.py) which will\n  download and extract the data for you.\n* As `ninja` to do it for you with `ninja download_test_data` once the\n  project is configured.\n\nThe simple workflow is:\n```bash\nmeson . build # Configure the project (using default directory for test data)\ncd build\nninja # Build\nninja download_test_data # Download the test data\nmeson test # Test\n```\n\nIt is possible to deactivate all tests using test data zim files by\npassing `none` to the `test_data_dir` option:\n```bash\nmeson . build -Dtest_data_dir=none\ncd build\nninja\nmeson test # Run tests but tests needing test zim files.\n```\n\nIf the automated tests fail or timeout, you need to be aware that some\ntests need up to 16GB of memory. You can skip those specific tests with:\n```bash\nSKIP_BIG_MEMORY_TEST=1 meson test\n```\n\nSome tests are checking error detection in multithread environment and\nthey need to sleep to let threads working (and detect error).\nHow many time to wait depends of your computer.\nIf you have `error_in_creator` test failing, you probably need to extend the waiting time.\nThis can be done by setting the env variable `WAIT_TIME_FACTOR_TEST` to a float factor.\nThe waiting time will multiplied by this factor.\n\n```\nWAIT_TIME_FACTOR_TEST=2 meson test\n```\n\n\nInstallation\n------------\n\nIf you want to install the Libzim and the headers you just have\ncompiled on your system, here we go:\n```bash\nninja -C build install\n```\n\nYou might need to run the command as root (or using `sudo`), depending\nwhere you want to install the libraries. After the installation\nsucceeded, you may need to run ldconfig (as root).\n\nUninstallation\n------------\n\nIf you want to uninstall the Libzim:\n```bash\nninja -C build uninstall\n```\n\nLike for the installation, you might need to run the command as root\n(or using `sudo`).\n\nTroubleshooting\n---------------\n\nIf you need to install Meson \"manually\":\n```bash\nvirtualenv -p python3 ./ # Create virtualenv\nsource bin/activate      # Activate the virtualenv\npip3 install meson       # Install Meson\nhash -r                  # Refresh bash paths\n```\n\nIf you need to install Ninja \"manually\":\n```bash\ngit clone git://github.com/ninja-build/ninja.git\ncd ninja\ngit checkout release\n./configure.py --bootstrap\nmkdir ../bin\ncp ninja ../bin\ncd ..\n```\n\nIf the compilation still fails, you might need to get a more recent\nversion of a dependency than the one packaged by your Linux\ndistribution. Try then with a source tarball distributed by the\nproblematic upstream project or even directly from the source code\nrepository.\n\nLicense\n-------\n\n[GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html) or\nlater, see [COPYING](COPYING) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenzim%2Flibzim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenzim%2Flibzim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenzim%2Flibzim/lists"}