Skip to content

thomasWeise/ultraGzip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UltraGzip

Travis CI Build Status

This tool tries to achieve the maximum possible gzip compression regardless of the necessary runtime.

It therefore attempts to compress an array of bytes by using several different settings of different gzip implementations available for Java, as well as other compression software installed on the system.

1. How to use UltraGzip from the Command Line

Run java -jar ultraGzip-0.9.1-full.jar ARGUMENTS

The following arguments are supported:

  • help print the help screen and all arguments
  • gzipIntensity=0...10 is the intensity. It ranges from 0 to 10, with 5 as default. UltraGzip is a bit slow and uses many tools. 5 is a good default setting that will provide a very strong compression already. If you kick the setting up to 10, the tool will become very slow, but maybe can squeeze out another 2 or 3 bytes.
  • nCores=1... the number of cores that are used, which is also the number of parallel jobs and external tools that can be executed at once. By default, this will be auto-detected as the number of available processors.
  • in=/path/to/file the path to the file with the source data to be compressed
  • si compress contents written to stdin instead of a file. You must specify either in=... or the si option.
  • out=/path/to/file the path to the file where the compressed data should be written to
  • so write the compressed contents to stdout instead of a file. You must specify either out=... or the so option.
  • help print the help screen
  • gzip=/path/to/gzip, advdef=/path/to/advancecomp, 7z=/path/to/7z, python3=/path/to/python3, pigz=/path/to/pigz, zopfli=/path/to/zopfli: optional arguments for specifying the paths to the external software tools that may be used by this program.

2. Requirements

If you are on Linux, the following utilities can improve the compression which can be achieved by installing the following additional programs:

  • gzip (should already be installed)
  • AdvanceCOMP (sudo apt-get install advancecomp)
  • 7-zip (sudo apt-get install p7zip-full)
  • zopfli (sudo apt-get install zopfli)
  • pigz (sudo apt-get install pigz)
  • Python 3's gzip library, which should normally be installed, too

3. Use as UltraGzip in your Java Code

You can import the class UltraGzip and then create a job which takes an array of byte as input data and returns an array of byte as compression result. The job implements Callable<byte[]>.

4. Licensing

This software uses JZlib as one of its internal gzip utilities. Although our software here is GPL licensed, JZlib is under a BSD-style license. The GPL licensing of our software therefore only applies to our own code, while the code of JZLib follows said BSD-style license, which is included in file LICENSE-JZlib.txt. The binary distribution of our software may include binary versions of JZlib.

5. Contact

If you have any questions or suggestions, please contact Prof. Dr. Thomas Weise of the Institute of Applied Optimization at Hefei University in Hefei, Anhui, China via email to tweise@hfuu.edu.cn with CC to tweise@ustc.edu.cn.

About

A tool trying to achieve the maximum possible gzip compression (regardless of the necessary runtime).

Topics

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE-JZlib.txt

Stars

Watchers

Forks

Packages

No packages published