Skip to content

pathawks/zipfli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zipfli

Create optimized ZIP archives using Zopfli compression.

zipfli produces smaller ZIP files by using Zopfli's deflate implementation, which achieves better compression ratios than standard deflate at the cost of longer compression times. It includes format presets for EPUB, ODF, and OOXML that automatically handle which files must be stored uncompressed per each format's spec.

Installation

cargo install zipfli

Or build from source:

git clone https://github.com/pathawks/zipfli.git
cd zipfli
cargo install --path .

Usage

zipfli output.zip file1.txt file2.txt

Write to stdout:

zipfli - file1.txt file2.txt > output.zip

Use a format preset:

zipfli --format epub book.epub mimetype META-INF/container.xml content.opf chapter1.xhtml

Format Presets

Preset Stored (uncompressed) files
epub mimetype, META-INF/manifest.xml, META-INF/container.xml
odf mimetype, META-INF/manifest.xml
ooxml [Content_Types].xml, _rels/.rels

EPUB and ODF presets also sort mimetype to appear first in the archive, as required by their specifications.

If a compressed file ends up larger than the original, it is automatically stored uncompressed instead.

Options

Option Description
-f, --format <FORMAT> Archive format preset (epub, odf, ooxml)
-i, --iterations-without-improvement <N> Zopfli iterations without improvement (default: 15)
-q, --quiet Suppress progress output
-h, --help Print help
-V, --version Print version

License

Licensed under either of Apache License, Version 2.0 or MIT License at your option.

About

Create optimized ZIP archives using Zopfli compression

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages