jimhester / Archive
Licence: other
R bindings to libarchive, supporting a large variety of archive formats
Stars: ✭ 90
Programming Languages
r
7636 projects
Labels
Projects that are alternatives of or similar to Archive
Numcompress
Python package to compress numerical series & numpy arrays into strings
Stars: ✭ 68 (-24.44%)
Mutual labels: compression
Deprecated Lame Mirror
[DEPRECATED] Old, Semi-official mirror of the CVS repository of the LAME MP3 encoder.
Stars: ✭ 73 (-18.89%)
Mutual labels: compression
Gifcompressor
An Android tool to compresses your GIFs into lightweight MP4 video using fast, hardware-accelerated encoders. Supports cropping, rotation, GIF concatenation and much more.
Stars: ✭ 85 (-5.56%)
Mutual labels: compression
Stdpack.c
Collection of small public domain de/compressors in plain C.
Stars: ✭ 73 (-18.89%)
Mutual labels: compression
Squeezer
Flexible general-purpose compressor with a touch of citrus
Stars: ✭ 78 (-13.33%)
Mutual labels: compression
Model Compression And Acceleration Progress
Repository to track the progress in model compression and acceleration
Stars: ✭ 63 (-30%)
Mutual labels: compression
Include Flate
A variant of include_bytes!/include_str! with compile-time deflation and runtime lazy inflation
Stars: ✭ 87 (-3.33%)
Mutual labels: compression
Html Compress Twig
Twig extension for compressing HTML and inline CSS/JS using WyriHaximus/HtmlCompress
Stars: ✭ 72 (-20%)
Mutual labels: compression
Fossildelta
An efficient delta compression algorithm written in C#
Stars: ✭ 82 (-8.89%)
Mutual labels: compression
Redoflacs
Parallel BASH commandline FLAC compressor, verifier, organizer, analyzer, and retagger
Stars: ✭ 71 (-21.11%)
Mutual labels: compression
Compress.js
A simple JavaScript based client-side image compression algorithm
Stars: ✭ 86 (-4.44%)
Mutual labels: compression
Woftool
woftool is a proof-of-concept utility for creating WOF-compressed files
Stars: ✭ 64 (-28.89%)
Mutual labels: compression
Ofxio
A collection of I/O core utils including a directory watcher, file filters and ordering, compression and more.
Stars: ✭ 78 (-13.33%)
Mutual labels: compression
Zippy
Pure Nim implementation of deflate, zlib, gzip and zip.
Stars: ✭ 88 (-2.22%)
Mutual labels: compression
Csso Rails
CSS Optimizer(csso) ruby wrapper for Rails Asset pipeline
Stars: ✭ 86 (-4.44%)
Mutual labels: compression
Denoflate
WebAssembly powered Deflate/Gzip/Zlib compression for Deno, written in Rust
Stars: ✭ 80 (-11.11%)
Mutual labels: compression
archive
R bindings to libarchive http://www.libarchive.org, providing support for many file archives, including tar, ZIP, 7-zip, RAR, CAB including those compressed by gzip, bzip2, compress, lzma, xz, and others.
Installation
You can install archive from github with:
# install.packages("devtools")
devtools::install_github("jimhester/archive")
Example
Single file archives
library(readr) # read_csv(), write_csv(), cols()
# Write a single dataset to zip
write_csv(mtcars, archive_write("mtcars.zip", "mtcars.csv"))
# Read the data back, by default the first file is read from the archive.
read_csv(archive_read("mtcars.zip"), col_types = cols())
#> # A tibble: 32 x 11
#> mpg cyl disp hp drat wt qsec vs am gear carb
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 21.0 6 160 110 3.90 2.620 16.46 0 1 4 4
#> 2 21.0 6 160 110 3.90 2.875 17.02 0 1 4 4
#> 3 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1
#> 4 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1
#> # ... with 28 more rows
# Also supports archiving and compression together
# Write a single dataset to zip
write_csv(mtcars, archive_write("mtcars.tar.gz", "mtcars.csv"))
# Read the data back
read_csv(archive_read("mtcars.tar.gz"), col_types = cols())
#> # A tibble: 32 x 11
#> mpg cyl disp hp drat wt qsec vs am gear carb
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 21.0 6 160 110 3.90 2.620 16.46 0 1 4 4
#> 2 21.0 6 160 110 3.90 2.875 17.02 0 1 4 4
#> 3 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1
#> 4 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1
#> # ... with 28 more rows
# Archive file sizes
file.size(c("mtcars.zip", "mtcars.tar.gz"))
#> [1] 738 651
Multi file archives
# Write a few files to the temp directory
write_csv(iris, "iris.csv")
write_csv(mtcars, "mtcars.csv")
write_csv(airquality, "airquality.csv")
# Add them to a new archive
archive_write_files("data.tar.xz", c("iris.csv", "mtcars.csv", "airquality.csv"))
# View archive contents
a <- archive("data.tar.xz")
a
#> # A tibble: 3 x 3
#> path size date
#> <chr> <dbl> <dttm>
#> 1 iris.csv 3716 2017-07-28 10:02:12
#> 2 mtcars.csv 1281 2017-07-28 10:02:12
#> 3 airquality.csv 2890 2017-07-28 10:02:12
# Read a specific file from the archive
read_csv(archive_read(a, "mtcars.csv"), col_types = cols())
#> # A tibble: 32 x 11
#> mpg cyl disp hp drat wt qsec vs am gear carb
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 21.0 6 160 110 3.90 2.620 16.46 0 1 4 4
#> 2 21.0 6 160 110 3.90 2.875 17.02 0 1 4 4
#> 3 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1
#> 4 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1
#> # ... with 28 more rows
Regular files (with compression)
file_write()
returns a connection to filtered by one or more compressions or encodings. file_read()
reads a compressed file, automatically detecting the compression used.
# Write bzip2, base 64 encoded data
write_csv(mtcars, file_write("mtcars.bz2", c("uuencode", "bzip2")))
# Read it back
read_csv(file_read("mtcars.bz2"), col_types = cols())
#> # A tibble: 32 x 11
#> mpg cyl disp hp drat wt qsec vs am gear carb
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 21.0 6 160 110 3.90 2.620 16.46 0 1 4 4
#> 2 21.0 6 160 110 3.90 2.875 17.02 0 1 4 4
#> 3 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1
#> 4 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1
#> # ... with 28 more rows
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].