0.01
No commit activity in last 3 years
No release in over 3 years
In-memory reading/writing of .tar.gz files
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 3.7
 Project Readme

GZipped Tar

A simple interface for reading and writing gzipped tar files (.tar.gz) in memory, without needing for any files to be stored in the file system.

Installation

gem "gzipped_tar", "~> 0.1.2"

Usage

This library lets you work with gzipped tar files directly. If you're reading, you don't need to extract all the files into the file system, and if you're writing, you can add content in without needing it to be persisted to the file system either.

# Add a path and its content to a gzipped tar archive
writer = GZippedTar::Writer.new
writer.add "file.txt", "hello world"

# Write that archive to disk:
File.write "archive.tar.gz", writer.output

# Read in an existing archive:
reader = GZippedTar::Reader.new File.read("archive.tar.gz")
# Or straight from a writer:
reader = GZippedTar::Reader.new writer.output

# And then get the contents of a path in that file:
reader.read "file.txt" #=> "hello world"

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/pat/gzipped_tar. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the GZipped Tar project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.