{"id":19167568,"url":"https://github.com/thomasweise/ultrasvgz","last_synced_at":"2026-05-18T05:41:05.003Z","repository":{"id":90948495,"uuid":"175724698","full_name":"thomasWeise/ultraSvgz","owner":"thomasWeise","description":"A tool trying to achieve the maximum possible svg compression (regardless of the necessary runtime).","archived":false,"fork":false,"pushed_at":"2020-10-14T08:21:17.000Z","size":931,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-03T23:12:05.251Z","etag":null,"topics":["gzip","java","minification","minifier","svg"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomasWeise.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-15T01:10:54.000Z","updated_at":"2023-09-08T05:35:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"8abb1466-8ea7-4729-8cea-9401a23ef9c8","html_url":"https://github.com/thomasWeise/ultraSvgz","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasWeise%2FultraSvgz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasWeise%2FultraSvgz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasWeise%2FultraSvgz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasWeise%2FultraSvgz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomasWeise","download_url":"https://codeload.github.com/thomasWeise/ultraSvgz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240247611,"owners_count":19771335,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gzip","java","minification","minifier","svg"],"created_at":"2024-11-09T09:38:19.613Z","updated_at":"2026-05-18T05:40:59.950Z","avatar_url":"https://github.com/thomasWeise.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UltraSvgz\n\n[\u003cimg alt=\"Travis CI Build Status\" src=\"http://img.shields.io/travis/thomasWeise/ultraSvgz/master.svg\" height=\"20\"/\u003e](http://travis-ci.org/thomasWeise/ultraSvgz/)\n\nThis tool converts Scalable Vector Graphics ([`svg`](http://en.wikipedia.org/wiki/SVG)s) into the `svgz` format, a [`gzip`](http://en.wikipedia.org/wiki/Gzip) compressed version thereof.\nThe goal is that the tool first performs pre-processing stesp in the hope to reduce the size of the `svg`, which is basically an [XML](http://en.wikipedia.org/wiki/XML) format, by removing useless spaces and hopefully eventually doing clever stuff to re-arrange and condense the contents in a lossless fashion.\nFor this, we use a wide variety of tools, even including minimizing the file via free online services by uploading it and downloading the result (requires internet connection).\nThen, it takes the resulting data and pipes it through our [UltraGzip](http://github.com/thomasWeise/ultraGzip) tool to achieve a strong compression.\n\n## 1. How to use `UlrtraSvgz` from the Command Line\n\nRun `java -jar ultraGzip-0.8.2-full.jar ARGUMENTS`\n\nThe following arguments are supported:\n\n- `help` print the help screen and all arguments\n- `svgIntensity=0...10` is the intensity of the svg processing. It ranges from 0 to 10, with 5 as default. UltraSvgz 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 slower.\n- `gzipIntensity=0...10` is the intensity used for the gzip compression. 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.\n- `in=/path/to/file` the path to the file with the source data to be compressed\n- `si` compress contents written to `stdin` instead of a file. You must specify either `in=...` or the `si` option. \n- `out=/path/to/file` the path to the file where the compressed data should be written to; if omitted and `in` is specified, an output file of the same name as the input will be generated in the input file's directory, but with an `.svgz` suffix.\n- `so` write the compressed contents to `stdout` instead of a file. You must specify either `out=...` or the `so` option.\n- `dontCleanseWhiteSpace` do not apply the internal routine for cleansing white space, because it might mess up double-spaces in text.\n- `help` print the help screen\n\n## 2. Requirements\n\nIf you are on Linux, the following utilities can improve the compression which can be achieved by\ninstalling the following additional programs:\n\n* [gzip](http://en.wikipedia.org/wiki/Gzip) (should already be installed)\n* [AdvanceCOMP](https://en.wikipedia.org/wiki/AdvanceCOMP) (`sudo apt-get install advancecomp`)\n* [7-zip](http://www.7-zip.org/) (`sudo apt-get install p7zip-full`)\n* [zopfli](http://en.wikipedia.org/wiki/Zopfli) (`sudo apt-get install zopfli`)\n* [pigz](http://zlib.net/pigz/) (`sudo apt-get install pigz`)\n* [Python 3's gzip](http://docs.python.org/3/library/gzip.html) library, which should normally be installed, too\n* [librsvg](http://wiki.gnome.org/Projects/LibRsvg) which can be installed via `sudo apt-get install librsvg2-bin librsvg2-common`.\n\nAn internet connection is needed to use the online minifiers (currently only \u003chttps://www.svgminify.com\u003e)\n\n## 3. Use as `UltraSvgz` in your Java Code\n\nYou can import the class `UltraSvgz` 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\u003cbyte[]\u003e`.\n\n## 4. Licensing\n\nThis software uploads your SVG to \u003chttps://www.svgminify.com\u003e, which is a free online svg minifying service provided Spikerog SAS, 15 Grand Rue, 11800 Laure Minervois, France.\nFor this step, obviously the terms and conditions of this service and company hold.\n\nThis software directly uses [scour](http://github.com/scour-project/scour) as one of\nits internal components.\nAlthough our software here is GPL-3 licensed, scour is under the Apache License Version 2.0.\nThe license of scour is contained in file LICENSE-scour.txt.\n\nThis software uses the linux binary version of [svgcleaner](http://github.com/RazrFalcon/svgcleaner) as one of its internal components.\nAlthough our software here is GPL-3 licensed, svgcleaner is under the GPL-2.\nWe obtained permission from Mr. Reizner via email to include his binaries this way.\nThe license of svgcleaner is contained in file LICENSE-svgcleaner.txt.\n\nThis software indirectly uses [JZlib](http://www.jcraft.com/jzlib/) as one of its internal `gzip` utilities. Although our software here is `GPL` licensed, JZlib is under a [BSD-style license](http://www.jcraft.com/jzlib/LICENSE.txt).\nThe GPL licensing of our software therefore _only_ applies to our own code, while the code of JZLib follows said [BSD-style license](http://www.jcraft.com/jzlib/LICENSE.txt), which is included in file LICENSE-JZlib.txt.\n\nThe binary distribution of our software may include binary versions of the above tools\n\n## 5. Contact\n\nIf you have any questions or suggestions, please contact\n[Prof. Dr. Thomas Weise](http://iao.hfuu.edu.cn/team/director) of the\n[Institute of Applied Optimization](http://iao.hfuu.edu.cn/) at\n[Hefei University](http://www.hfuu.edu.cn) in\nHefei, Anhui, China via\nemail to [tweise@hfuu.edu.cn](mailto:tweise@hfuu.edu.cn) with CC to [tweise@ustc.edu.cn](mailto:tweise@ustc.edu.cn).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasweise%2Fultrasvgz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasweise%2Fultrasvgz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasweise%2Fultrasvgz/lists"}