tarball
Version, currently 0.1.35 versions
- 0.1.4latestJun 14, 2019
- 0.1.3not indexedJun 14, 2019
- 0.1.2not indexedJun 14, 2019
- 0.1.1not indexedJun 14, 2019
- 0.1.0not indexedJun 14, 2019
github.com/arcage/tarball.cr
TAR archive reader of Crystal
Nothing has been indexed for 0.1.3 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
tarball:
github: arcage/tarball.cr
version: ~> 0.1.3Then run:
shards installshard.yml
No shard.yml has been indexed for 0.1.3. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
TAR archive reader for Crystal
This shard makes you to read the TAR archive files(POSIX ustar format and some functions in GNUTAR fomat).
No external library needed. This is written in pure Crystal.
In this version, following entry types are supported:
- Regular file (typeflag:
'\0'or'0') - Hardlink (typeflag:
'1') - Symlink (typeflag:
'2') - Directory (typeflag:
'5') - PAX data (typeflag:
'x') (mtime, path, linkpath, uid, gid) - GNU long path name (typeflag:
'L') - GNU long link name (typeflag:
'K')
Other entry type will be extracted as a regular file.
Supporting gzipped tar archive file.
Installation
Add the dependency to your shard.yml:
dependencies:
tarball:
github: arcage/tarball.cr
Then, run shards install
Usage
require "tarball"
# Extracts all files in "archive.tar" to under the "data" directory.
Tarball.extract_all("archive.tar", "data")
Tarball.open("archive.tar") do |tar|
# list of included file system objects.
tar.filenames
#=> ["dir/", "dir/file_name.txt", "dir/image.png"]
# extract specific file to specific path.
tar.extract_file("dir/file_name.txt", "other_name.txt")
# write content data to IO object.
tar.write_content("dir/file_name.txt", STDOUT)
end
# open gzipped tar archive
Tarball.open_gz("archive.tar.gz") do |tar|
# ...
end
API Documents
Contributors
- ʕ·ᴥ·ʔAKJ - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.3- Tagged
- Jun 14, 2019
- Commit
f5c72b23e040- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/arcage/tarball.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 16, 2026
- Synced
- Aug 16, 2026
- Versions
- 5