{"id":13547328,"url":"https://github.com/AppImageCommunity/zsync2","last_synced_at":"2025-04-02T19:32:56.854Z","repository":{"id":43703549,"uuid":"105511842","full_name":"AppImageCommunity/zsync2","owner":"AppImageCommunity","description":"Rewrite of https://github.com/AppImage/zsync-curl, using modern C++, providing both a library and standalone tools.","archived":false,"fork":false,"pushed_at":"2024-05-30T11:55:22.000Z","size":412,"stargazers_count":127,"open_issues_count":34,"forks_count":24,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-08-06T16:10:16.082Z","etag":null,"topics":["cpp","cpp11","update","zsync"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AppImageCommunity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2017-10-02T08:14:41.000Z","updated_at":"2024-08-06T16:10:21.914Z","dependencies_parsed_at":"2024-05-30T13:07:24.159Z","dependency_job_id":null,"html_url":"https://github.com/AppImageCommunity/zsync2","commit_stats":null,"previous_names":["appimage/zsync2"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppImageCommunity%2Fzsync2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppImageCommunity%2Fzsync2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppImageCommunity%2Fzsync2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppImageCommunity%2Fzsync2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AppImageCommunity","download_url":"https://codeload.github.com/AppImageCommunity/zsync2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246880333,"owners_count":20848842,"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":["cpp","cpp11","update","zsync"],"created_at":"2024-08-01T12:00:54.008Z","updated_at":"2025-04-02T19:32:55.146Z","avatar_url":"https://github.com/AppImageCommunity.png","language":"C","readme":"# zsync2\n\n![CI](https://github.com/AppImage/zsync2/workflows/CI/badge.svg)\n\nA rewrite of the advanced file download/sync tool zsync.\n\n*Note: \"zsync2\" is a working title which might be changed in the future.*\n\nThe rewrite changes fundamental principles of how zsync works. For example,\nthe new code will be C++11. Furthermore, the entire functionality will be\nbundled in a single library called libzsync2. The library will serve as a base\nfor the new zsync2 main binary, but can then also be linked by other projects\nwhich seek to make use of the algorithms and functionality in it.\n\nThis project is intended to remain compatible to the original zsync, i.e.,\nthe zsync file format will stay the same etc. However, the zsync file format\nshould be extended to be able to serve additional purposes as well. Such\npurposes could be e.g., adding meta information like version numbers, etc.\n\n\n## Requirements\n\nAlthough the library is written in C++11, it is intended that the headers\nare compatible to older revisions of the C++ language. Therefore, a pattern\ncalled Opaque Data Type is applied to all classes defined by the headers of\nthis library.\n\n## Building\n\nTo build on Debian or Ubuntu style systems:\n\n```\nsudo apt-get -y install git cmake g++ libssl-dev libssh2-1-dev libcurl4-gnutls-dev zlib1g-dev libgcrypt20-dev\n   \ngit submodule update --init\nmkdir build\ncd build\ncmake .. -DUSE_SYSTEM_CURL=1 -DBUILD_CPR_TESTS=0\nmake -j$(nproc)\n```\n\nSee `.travis.yml` for building on Travis CI.\n\n## Functional description\n\nzsync is a well known tool for downloading and updating local files from HTTP\nservers using the well known algorithms rsync uses for diffing binary files.\nTherefore, it becomes possible to synchronize modifications by exchanging the\nchanged blocks locally using `Range:` requests.\n\nThe system is based on meta files called `.zsync` files. They contain hash\nsums for every block of data. The file is generated from and stored along\nwith the actual file it refers to. First, the client downloads the meta file.\nThen, it lets the same algorithms used to generate the meta file hash the\nlocal file. Then, just like with rsync, both lists of hash sums are compared.\nThen, modified blocks are fetched from the server, and with the unmodified\nblocks of binary data from the original files, a new file is put together,\nwhich eventually replaces the original.\n\nDue to how system works, nothing but a \"dumb\" HTTP server is required to make\nuse of zsync2. This makes it easy to integrate zsync2 into existing systems.\n\n\n## Applications\n\nA popular application scenario is software deployment. Here, the popular\n\"update channel\" system can be used to describe the update model: For normal\nupdates (i.e., staying on the same channel), one should call zsync2 with a URL\nto the `.zsync` file of the latest release of the application. Without\nadditional effort, zsync2 is then going to update the file accordingly. One\ndoes not have to compare meta data to check for updates etc., and information\nlike version numbers for example become purely informational for the user, but\nirrelevant for the actual update process. This makes setting up an update\ninfrastructure easier (one just has to set up a static URL to the latest\nfile).\n\n\n## Licensing\n\nThe original source code has been released under the terms of the Artistic\nLicense v2. Since this rewrite is a derivative work, it is published under the\nsame license. See COPYING for a copy of the license.\n\n\n## Current State\n\nAlthough zsync2 still shares a lot of the code with the original project, it is\nas of now not functional. While debugging is ongoing, the API is somewhat ready\nto be used by other projects. The project is therefore published in this state\nto allow testing the integration into other projects. \n","funding_links":[],"categories":["C","cpp"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAppImageCommunity%2Fzsync2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAppImageCommunity%2Fzsync2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAppImageCommunity%2Fzsync2/lists"}