{"id":13813296,"url":"https://github.com/JayXon/Leanify","last_synced_at":"2025-05-15T00:32:39.808Z","repository":{"id":6831556,"uuid":"8079877","full_name":"JayXon/Leanify","owner":"JayXon","description":"lightweight lossless file minifier/optimizer","archived":false,"fork":false,"pushed_at":"2024-04-22T10:29:50.000Z","size":1868,"stargazers_count":831,"open_issues_count":22,"forks_count":75,"subscribers_count":38,"default_branch":"master","last_synced_at":"2024-11-17T00:00:52.141Z","etag":null,"topics":["compression","data-uri","epub","fb2","gzip","ico","jpeg","lossless","minifier","minify","mozjpeg","optimizer","png","recompress","svg","swf","tar","xml","zip","zopfli"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JayXon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-02-07T19:24:39.000Z","updated_at":"2024-10-29T17:59:04.000Z","dependencies_parsed_at":"2024-08-04T04:03:48.020Z","dependency_job_id":"cd27c81e-4257-4938-a413-768f98bbf078","html_url":"https://github.com/JayXon/Leanify","commit_stats":{"total_commits":417,"total_committers":9,"mean_commits":"46.333333333333336","dds":0.1774580335731415,"last_synced_commit":"7847668ac5bf0df1d940b674bc8b907bd1b37044"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayXon%2FLeanify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayXon%2FLeanify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayXon%2FLeanify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayXon%2FLeanify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JayXon","download_url":"https://codeload.github.com/JayXon/Leanify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225319207,"owners_count":17455724,"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":["compression","data-uri","epub","fb2","gzip","ico","jpeg","lossless","minifier","minify","mozjpeg","optimizer","png","recompress","svg","swf","tar","xml","zip","zopfli"],"created_at":"2024-08-04T04:01:11.958Z","updated_at":"2024-11-19T08:30:22.316Z","avatar_url":"https://github.com/JayXon.png","language":"C++","readme":"Leanify [![GitHub Actions CI](https://github.com/JayXon/Leanify/actions/workflows/ci.yml/badge.svg)](https://github.com/JayXon/Leanify/actions) [![Windows Build status](https://ci.appveyor.com/api/projects/status/2p9i3ru8apwq2uic?svg=true)](https://ci.appveyor.com/project/JayXon/leanify) [![Download](https://img.shields.io/github/downloads/JayXon/Leanify/total.svg)](https://github.com/JayXon/Leanify/releases) [![Latest Release](https://img.shields.io/github/release/JayXon/Leanify.svg)](https://github.com/JayXon/Leanify/releases/latest) [![GitHub license](https://img.shields.io/github/license/JayXon/Leanify.svg)](LICENSE)\n=======\n\nLeanify is a lightweight lossless file minifier/optimizer. It removes unnecessary data (debug information, comments, metadata, etc.) and recompress the file to reduce file size. It will not reduce image quality at all.\n\n\n## Features\n\n* Support recursive minifying. (e.g. a [PNG] inside an [APK] inside a [ZIP])\n* Support a wide variety of [file formats](#file-formats).\n* Lightweight, one file, under 1MB, no external dependency.\n* Everything is done in memory, no temporary files.\n* Cross-Platform, support Windows, Linux, Mac.\n* Support traverse directory recursively.\n* Ability to identify file format by its data instead of name.\n\n\n## Disclaimer\n\nI'm not respossible for any consequence of using Leanify.\n\n**PLEASE BACKUP THE FILE BEFORE USING LEANIFY!**\n\n\n## File Formats\n\n\n#### APK file (.apk)\n\nIt is based on [ZIP].\n\nNote that modifying files inside `APK` will break digital signature.\nTo install it, you'll have to sign it again.\n\nIf you don't want to modify any files inside `APK`, use `-d 1` option.\n\n\n#### Comic book archive (.cbt, .cbz)\n\n`cbt` is based on [tar]. `cbz` is based on [ZIP].\n\n\n#### Microsoft Office document 2007-2013 (.docx, .xlsx, .pptx)\n\nIt is based on [XML] and [ZIP].\n\nOffice document 1997-2003 (.doc, .xls, .ppt) is not supported.\n\n\n#### Data URI (.html .htm .js .css)\n\nLooks for `data:image/*;base64` and leanify base64 encoded embedded image.\n\n\n#### Design Web Format (.dwf, dwfx)\n\nIt is based on [ZIP].\n\n\n#### EPUB file (.epub)\n\nIt is based on [ZIP].\n\n\n#### FictionBook (.fb2, .fb2.zip)\n\nIt is based on [XML].\n\nLeanify embedded images.\n\n\n#### GFT file (.gft)\n\nIt's an image container format found in Tencent QQ.\n\nLeanify the image inside.\n\n\n#### gzip file (.gz, .tgz)\n\nLeanify file inside and recompress deflate stream.\n\nRemove all optional section: `FEXTRA`, `FNAME`, `FCOMMENT`, `FHCRC`.\n\n\n#### Icon file (.ico)\n\nConvert 256x256 BMP to [PNG].\n\nLeanify [PNG] inside, if any.\n\n\n#### Java archive (.jar)\n\nIt is based on [ZIP].\n\n\n#### JPEG image (.jpeg, .jpg, .jpe, .jif, .jfif, .jfi, .thm)\n\nRemove all application markers (e.g. `Exif` (use `--keep-exif` to keep it), `ICC profile`, `XMP`) and comments.\n\nOptimize with `mozjpeg`.\n\n\n#### Lua object file (.lua, .luac)\n\nRemove all debugging information:\n\n* Source name\n* Line defined and last line defined\n* Source line position list\n* Local list\n* Upvalue list\n\n\n#### OpenDocument (.odt, .ods, .odp, .odb, .odg, .odf)\n\nIt is based on [XML] and [ZIP].\n\n\n#### OpenRaster (.ora)\n\nIt is based on OpenDocument and [PNG].\n\n\n#### PE file (.exe, .dll, .ocx, .scr, .cpl)\n\nLeanify embedded resource.\n\nRemove `Relocation Table` in executable file.\n\nRemove undocumented `Rich Header`.\n\nOverlap `PE Header` and `DOS Header`.\n\n\n#### PNG image (.png, .apng)\n\nRemove all ancillary chunks except for:\n\n* `tRNS`: transparent information\n* `fdAT`, `fcTL`, `acTL`: These chunks are used by `APNG`\n* `npTc`: Android 9Patch images (*.9.png)\n\nOptimize with `ZopfliPNG`.\n\n\n#### RDB archive (.rdb)\n\nIt is an archive format found in Tencent QQ.\n\nLeanify all files inside.\n\n\n#### Flash file (.swf)\n\nLeanify embedded images.\n\nRecompress it with `LZMA`.\n\nRemove Metadata Tag.\n\n\n#### SVG image (.svg, .svgz)\n\nIt is based on [XML].\n\nRemove metadata.\n\nShrink spaces in attributes.\n\nRemove empty attributes.\n\nRemove empty text element and container element.\n\n#### tar archive (.tar)\n\nLeanify all files inside.\n\n\n#### XML document (.xml, .xsl, .xslt)\n\nRemove all comments, unnecessary spaces, tabs, line breaks.\n\n\n#### XPInstall (.xpi)\n\nIt is based on [ZIP].\n\nNote that modifying files inside `xpi` will break digital signature.\nTo install it, you'll have to sign it again.\n\n\n#### XPS document (.xps, .oxps)\n\nIt is based on [XML] and [ZIP].\n\n\n#### ZIP archive (.zip)\n\nLeanify all files inside and recompress deflate stream using [Zopfli](https://github.com/google/zopfli).\n\nUse `STORE` method if `DEFLATE` makes file larger.\n\nRemove extra field in `Local file header`.\n\nRemove `Data descriptor structure`, write those information to `Local file header`.\n\nRemove extra field and file comment in `Central directory file header`.\n\nRemove comment in `End of central directory record`.\n\n\n\n## Downloads\n\n[Stable Releases](https://github.com/JayXon/Leanify/releases/)\n\n[Windows Nightly Build](https://ci.appveyor.com/project/JayXon/leanify)\n\n\n\n## Usage\n\n```\nUsage: leanify [options] paths\n  -i, --iteration \u003citeration\u003e   More iterations produce better result, but\n                                  use more time, default is 15.\n  -d, --max_depth \u003cmax depth\u003e   Maximum recursive depth, unlimited by default.\n                                  Set to 1 will disable recursive minifying.\n  -f, --fastmode                Fast mode, no recompression.\n  -q, --quiet                   No output to stdout.\n  -v, --verbose                 Verbose output.\n  -p, --parallel                Distribute all tasks to all CPUs.\n  --keep-exif                   Do not remove Exif.\n```\n\n\n## Compiling\n\n#### Windows\n\n* Visual Studio 2015+\n\n  Use Leanify.vcxproj\n\n* gcc 5+\n\n  `build_gcc.bat` or `mingw32-make`\n\n\n#### Linux, Mac\n\n  gcc 5+ or clang 3.6+\n```\nmake\n```\n\n\n\n[APK]: #apk-file-apk\n[PNG]: #png-image-png-apng\n[tar]: #tar-archive-tar\n[XML]: #xml-document-xml-xsl-xslt\n[ZIP]: #zip-archive-zip\n","funding_links":[],"categories":["C++","Image Optimizers","Executable"],"sub_categories":["Meetups","Media file container formats of mux overhead: ###"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJayXon%2FLeanify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJayXon%2FLeanify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJayXon%2FLeanify/lists"}