archive
Version, currently 0.4.05 versions
- 0.5.0latestAug 20, 2021
- 0.4.0not indexedAug 20, 2021
- 0.3.0not indexedAug 20, 2021
- 0.2.0not indexedAug 20, 2021
- 0.1.0not indexedAug 20, 2021
github.com/hkalexling/archive.cr
libarchive bindings for Crystal
3 stars
2 dependents
License: MIT
Nothing has been indexed for 0.4.0 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:
archive:
github: hkalexling/archive.cr
version: ~> 0.4.0Then run:
shards installshard.yml
No shard.yml has been indexed for 0.4.0. 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.
# archive.cr

`archive.cr` provides [libarchive](https://github.com/libarchive/libarchive) bindings for Crystal. Only a small subset of the libarchive functions are implemented, and currently only extraction is supported.
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
archive:
github: hkalexling/archive.cr
```
2. Run `shards install`
## Usage
```crystal
require "archive"
# Extract all entries
Archive::File.open "file.zip" do |f|
f.entries.map do |e|
# Skip non-file entries
next unless e.info.file?
filename = e.filename
size = e.size
file = File.new filename, "wb"
file.write e.read
end
end
# Extract a specific entry
Archive::File.open "file.zip" do |f|
file = File.new "img.jpg", "wb"
file.write f.read_entry "img.jpg"
end
```
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.4.0- Tagged
- Aug 20, 2021
- Commit
35ad2a33b50c- Indexed
- not yet
Dependents
Repository
github.com/hkalexling/archive.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 12, 2026
- Synced
- Aug 12, 2026
- Versions
- 5