zip v1.0.0

0

Monthly downloads

0th

Percentile

Cross-Platform 'zip' Compression

Cross-Platform 'zip' Compression Library. A replacement for the 'zip' function, that does not require any additional external tools on any platform.

Readme

zip

Cross-Platform 'zip' Compression

Linux Build Status Windows Build status CRAN RStudio mirror downloads Coverage Status

Installation

source("https://install-github.me/gaborcsardi/zip")

Usage

library(zip)
#> 
#> Attaching package: 'zip'
#> The following object is masked from 'package:utils':
#> 
#>     zip

Creating ZIP files

zip() creates a new ZIP archive. (It overwrites the output file if it exists.) Simply supply all directories and files that you want to include in the archive.

It makes sense to change to the top-level directory of the files before archiving them, so that the files are stored using a relative path name.

zip("sources.zip", c("R", "src"))
file.info("sources.zip")
#>               size isdir mode               mtime               ctime
#> sources.zip 203203 FALSE  644 2017-04-10 09:36:35 2017-04-10 09:36:35
#>                           atime uid gid       uname grname
#> sources.zip 2017-04-10 09:35:22 501  20 gaborcsardi  staff

Directories are added recursively by default.

zip_append() is similar to zip(), but it appends files to an existing ZIP archive.

Listing ZIP files

zip_list() lists files in a ZIP archive. It returns a data frame:

zip_list("sources.zip")
#>       filename compressed_size uncompressed_size
#> 1    R/utils.R             251               508
#> 2      R/zip.R             926              2412
#> 3   src/init.c             285               510
#> 4   src/init.o            1406              3388
#> 5  src/miniz.h           49202            226019
#> 6   src/rzip.c             624              1751
#> 7   src/rzip.o            2516              6132
#> 8    src/zip.c            4370             18582
#> 9    src/zip.h            1658              5389
#> 10   src/zip.o          100255            254228
#> 11  src/zip.so           40644             96680

Uncompressing ZIP files

This is currently not supported by the zip package, but available from base R, via utils::unzip().

License

CC0

Functions in zip

Name Description
zip Compress Files into 'zip' Archives
zip_list List Files in a 'zip' Archive
No Results!

Last month downloads

Details

License CC0
LazyData true
URL https://github.com/gaborcsardi/zip
BugReports https://github.com/gaborcsardi/zip/issues
RoxygenNote 6.0.1
Encoding UTF-8
NeedsCompilation yes
Packaged 2017-04-25 10:54:02 UTC; gaborcsardi
Repository CRAN
Date/Publication 2017-04-25 14:36:39 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/zip)](http://www.rdocumentation.org/packages/zip)