{"id":13423477,"url":"https://github.com/r-lib/zip","last_synced_at":"2025-05-15T12:03:59.043Z","repository":{"id":19733999,"uuid":"87673925","full_name":"r-lib/zip","owner":"r-lib","description":"Platform independent zip compression via miniz","archived":false,"fork":false,"pushed_at":"2025-05-12T08:20:03.000Z","size":6317,"stargazers_count":87,"open_issues_count":20,"forks_count":22,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-12T08:48:23.380Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://r-lib.github.io/zip/","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/r-lib.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","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-04-09T01:06:13.000Z","updated_at":"2025-05-12T08:18:24.000Z","dependencies_parsed_at":"2024-05-01T14:16:44.621Z","dependency_job_id":"97868f04-3f91-4e06-922c-f0ecd1b23a4d","html_url":"https://github.com/r-lib/zip","commit_stats":{"total_commits":251,"total_committers":14,"mean_commits":"17.928571428571427","dds":0.1394422310756972,"last_synced_commit":"c5b2701f8f23d86bb09e855675530a95d43c8686"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Fzip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Fzip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Fzip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Fzip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r-lib","download_url":"https://codeload.github.com/r-lib/zip/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253708794,"owners_count":21951057,"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":[],"created_at":"2024-07-31T00:00:35.539Z","updated_at":"2025-05-15T12:03:54.021Z","avatar_url":"https://github.com/r-lib.png","language":"C","readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# zip\n\n\u003e Cross-Platform 'zip' Compression\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/r-lib/zip/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-lib/zip/actions/workflows/R-CMD-check.yaml)\n[![](https://www.r-pkg.org/badges/version/zip)](https://www.r-pkg.org/pkg/zip)\n[![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/zip)](https://www.r-pkg.org/pkg/zip)\n[![Codecov test coverage](https://codecov.io/gh/r-lib/zip/graph/badge.svg)](https://app.codecov.io/gh/r-lib/zip)\n\u003c!-- badges: end --\u003e\n\n## Installation\n\nStable version:\n\n```{r eval = FALSE}\ninstall.packages(\"zip\")\n```\n\nDevelopment version:\n\n```{r eval = FALSE}\npak::pak(\"r-lib/zip\")\n```\n\n## Usage\n\n```{r, include = FALSE, echo = FALSE, results = \"hide\"}\nlibrary(zip)\n```\n\n```{r}\nlibrary(zip)\n```\n\n### Creating ZIP files\n\n`zip()` creates a new ZIP archive. (It overwrites the output file if it\nexists.) Simply supply all directories and files that you want to include\nin the archive.\n\nIt makes sense to change to the top-level directory of the files before\narchiving them, so that the files are stored using a relative path name.\n\n```{r}\nzip(\"sources.zip\", c(\"R\", \"src\"))\nfile.info(\"sources.zip\")\n```\n\nDirectories are added recursively by default.\n\n`zip_append()` is similar to `zip()`, but it appends files to an existing\nZIP archive.\n\n### Listing ZIP files\n\n`zip_list()` lists files in a ZIP archive. It returns a data frame:\n\n```{r}\nzip_list(\"sources.zip\")\n```\n\n### Uncompressing ZIP files\n\n`unzip()` uncompresses a ZIP archive:\n\n```{r}\nexdir \u003c- tempfile()\nunzip(\"sources.zip\", exdir = exdir)\ndir(exdir)\n```\n\n### Compressing and uncompressing in background processes\n\nYou can use the `zip_process()` and  `unzip_process()` functions to\ncreate background zip / unzip processes. These processes were implemented\non top of the `processx::process` class, so they are pollable.\n\n## License\n\nMIT\n","funding_links":[],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-lib%2Fzip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr-lib%2Fzip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-lib%2Fzip/lists"}