zip64
Version, currently 0.1.04 versions
- 0.3.0latestMar 2, 2026
- 0.2.1not indexedJun 22, 2026
- 0.2.0not indexedJun 22, 2026
- 0.1.0not indexedJun 22, 2026
github.com/crystal-garage/crystal-zip64
An alternate ZIP reader and writer for Crystal
Nothing has been indexed for 0.1.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:
zip64:
github: crystal-garage/crystal-zip64
version: ~> 0.1.0Then run:
shards installshard.yml
No shard.yml has been indexed for 0.1.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.
crystal-zip64
An alternate ZIP reader and writer for Crystal.
- Drop-in replacement for
Compress::Zip - Allows you to compress files bigger than 4GB
- Tested on Linux, macOS and Windows
Extracted from https://github.com/crystal-lang/crystal/pull/11396. Based on https://github.com/crystal-lang/crystal/pull/7236.
Inspired by https://github.com/WeTransfer/cr_zip_tricks
Installation
-
Add the dependency to your
shard.yml:dependencies: zip64: github: crystal-garage/crystal-zip64 -
Run
shards install
Usage
require "zip64"
Reader
Zip64::Reader.open("./file.zip") do |zip|
zip.each_entry do |entry|
p entry.filename
p entry.file?
p entry.dir?
p entry.io.gets_to_end
end
end
Writer
File.open("./file.zip", "w") do |file|
Zip64::Writer.open(file) do |zip|
# Add a file with a String content
zip.add "foo.txt", "contents of foo"
# Add a file and write data to it through an IO
zip.add("bar.txt") do |io|
io << "contents of bar"
end
# Add a file by referencing a file in the filesystem
# (the file is automatically closed after this call)
zip.add("baz.txt", File.open("./some_file.txt"))
# Add a directory
zip.add_dir("dir")
end
end
Limitations
- Only compression methods 0 (STORED) and 8 (DEFLATED) are supported.
- Encrypted ZIPs (traditional PKZIP or AES) are not supported.
- Multi-disk (split) ZIP archives are not supported.
- For very large archives, prefer
Zip64::Reader(streaming).Zip64::Fileprovides random access and supports Zip64 structures, but non-Fileinputs may be constrained by the underlying IO APIs.
Contributing
- Fork it (https://github.com/crystal-garage/crystal-zip64/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Julik Tarkhanov - creator and maintainer
- Anton Maminov - 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.0- Tagged
- Jun 22, 2026
- Commit
5b79acc69c99- Indexed
- not yet
Dependents
Repository
github.com/crystal-garage/crystal-zip64
Metadata
- Created
- Aug 12, 2026
- Updated
- Sep 25, 2026
- Synced
- Sep 25, 2026
- Versions
- 4