{"id":13429091,"url":"https://github.com/dropbox/lepton","last_synced_at":"2025-09-28T14:31:02.958Z","repository":{"id":37334842,"uuid":"63262178","full_name":"dropbox/lepton","owner":"dropbox","description":"Lepton is a tool and file format for losslessly compressing JPEGs by an average of 22%.","archived":true,"fork":false,"pushed_at":"2024-03-04T16:56:20.000Z","size":54427,"stargazers_count":5007,"open_issues_count":27,"forks_count":354,"subscribers_count":140,"default_branch":"master","last_synced_at":"2024-12-17T01:03:35.262Z","etag":null,"topics":["compression","compression-algorithm","decompression","jpeg","lossless-compression-algorithm"],"latest_commit_sha":null,"homepage":"https://blogs.dropbox.com/tech/2016/07/lepton-image-compression-saving-22-losslessly-from-images-at-15mbs/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dropbox.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":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-13T16:27:29.000Z","updated_at":"2024-12-15T04:42:26.000Z","dependencies_parsed_at":"2024-05-28T22:01:01.592Z","dependency_job_id":"9002adc1-948a-4f32-b184-4667c6174969","html_url":"https://github.com/dropbox/lepton","commit_stats":{"total_commits":938,"total_committers":31,"mean_commits":"30.258064516129032","dds":0.5330490405117271,"last_synced_commit":"f34c7f42d2e0d688239cb880648dc152713c4eae"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropbox%2Flepton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropbox%2Flepton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropbox%2Flepton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dropbox%2Flepton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dropbox","download_url":"https://codeload.github.com/dropbox/lepton/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234525628,"owners_count":18846937,"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","compression-algorithm","decompression","jpeg","lossless-compression-algorithm"],"created_at":"2024-07-31T02:00:25.047Z","updated_at":"2025-09-28T14:31:00.512Z","avatar_url":"https://github.com/dropbox.png","language":"C++","readme":"\u003cblockquote\u003e\n\u003cb\u003e⚠️\u0026nbsp;\u0026nbsp;Deprecation Notice for the Dropbox Lepton project\u003c/b\u003e\u003cbr\u003e\u003cbr\u003e\n\n\u003cem\u003eDear Lepton users and developers,\u003cbr\u003e\u003cbr\u003e\nThank you so much for using and contributing to Lepton over the years! We’ve recently realized that we no longer have sufficient resources to adequately support this project. This includes providing timely fixes to bugs and vulnerabilities such as those that were [recently reported to us](https://github.com/dropbox/lepton/issues/158). While we did ensure that the reported vulnerabilities don’t affect our internal use of Lepton, we unfortunately don’t have the capacity to properly fix these and future issues in this public repo. Therefore, after some consideration, we’ve decided to deprecate and archive the project. We apologize for any inconvenience and appreciate your understanding.\u003cbr\u003e\u003cbr\u003e\n    \nIf you would like to continue using Lepton, please check out Microsoft’s [implementation of Lepton in Rust](https://github.com/microsoft/lepton_jpeg_rust) or alternatively consider switching to other lossless compression methods such as [Brotli](https://dropbox.tech/infrastructure/lossless-compression-with-brotli) or to modern image formats such as [WebP](https://en.wikipedia.org/wiki/WebP) or [JPEG XL](https://en.wikipedia.org/wiki/JPEG_XL).\u003c/em\u003e\n\u003c/blockquote\u003e\n\n# Lepton\n\nLepton is a tool and file format for losslessly compressing JPEGs by an average of 22%.\n\nThis can be used to archive large photo collections, or to serve images live and save 22% bandwidth.\n\n\n[![Build Status](https://travis-ci.org/dropbox/lepton.svg?branch=master)](https://travis-ci.org/dropbox/lepton)\n\n\n## Build directions\nUsing a single core\n\n    ./autogen.sh\n    ./configure\n    make\n    make check\n\nFor multiprocessor machines:\n\n    ./autogen.sh\n    ./configure\n    make -j8\n    make check -j8\n\nUsing CMAKE:\n\n    mkdir -p build\n    cd build\n    cmake ..\n    make -j8\n\nOn Windows\n\n    mkdir -p build\n    cd build\n    \"c:\\Program Files\\CMake\\bin\\cmake\" ..\n    start .\n    REM Double click the Visual Studio project\n\n## Usage\n\nTo roundtrip (compress and decompress) an image, `original.jpg`, do the following:\n\n    ./lepton original.jpg compressed.lep\n    ./lepton compressed.lep restored_original.jpg\n\nOr all at once:\n\n    ./lepton original.jpg compressed.lep \u0026\u0026 ./lepton compressed.lep restored_original.jpg \u0026\u0026 diff restored_original.jpg original.jpg \u0026\u0026 echo no differences\n\n\nLepton may also be used with pipes -- be sure to check the exit code when using pipes\nas if compression fails lepton will produce 0 bytes and return a nonzero exit code\n(failure). In this case do not assume the 0 byte file is representative of the original.\n\n    ./lepton - \u003c original.jpg \u003e compressed.lep\n    ./lepton - \u003c compressed.lep \u003e restored_original.jpg\n\n\nYou may specify higher memory limits than the default for lepton to handle bigger images:\n\n    ./lepton -memory=1024M -threadmemory=128M input_file output_file\n\nAdditionally you can configure lepton to process progressive jpegs.\nWarning: these take more memory to decode than normal JPEGs since the entire framebuffer\nmust be kept in memory for the duration of the decompression, instead of just 2 rows of blocks.\n\n    ./lepton -allowprogressive -memory=1024M -threadmemory=128M progressive.jpg compressedprogressive.lep\n\n\n## Submitting pull requests to lepton\n\nPlease begin by filling out the contributor form and asserting that\n\n    The code I'm contributing is mine, and I have the right to license it.\n    I'm granting you a license to distribute said code under the terms of this agreement.\n\nat this page:\nhttps://opensource.dropbox.com/cla/\n\nThen create a new pull request through the github interface\n\n## Debugging\n\nLepton is designed to be easy to debug, but a command line requirement is necessary to prevent\nthe standard forks that let it do a secure verification in a separate process.\n\nTo avoid setting follow fork flags, please pass -skipverify to the command line.\nThis will stop verification and let you debug the app as a single process application.\nIf the bug happens in single threaded mode, also you can pass -singlethread which makes\nit easier to step through the code without other threads hitting breakpoints.\n\n## Bindings for other languages\n\n* NodeJS: https://github.com/whitef0x0/node-lepton\n* PHP: https://github.com/gtuk/php-lepton\n\n## Acknowledgements\n\nMany thanks to Matthias Stirner and HTW Aalen University for the development of the [uncmpJPG](http://packjpg.encode.su/?page_id=178) library.\n\nThanks to the VPX authors for their highly tuned bool reader and bool writer implementations.\n\n## Related Work\n\nBe sure to read the groundbreaking research done by Matthias Stirner, Gehard Seelman and HTW Aalen University in their [2007 paper](http://www.elektronik.htw-aalen.de/packjpg/_notes/PCS2007_PJPG_paper_final.pdf) and check out their excellent [PackJPG](http://github.com/packjpg) repositories for compression of JPEG MP3 BMP and PMN formats.\n\nAlso the [paq](http://mattmahoney.net/dc/) algorithms combine for a highly compressed JPEG result when decompression time is less critical.\n\nWhen the compressed JPEG needs to also be a JPEG, there is [mozjpg](https://github.com/mozilla/mozjpeg) to explore as well.\n\n## License\n\nUnless otherwise noted:\n\n```\nCopyright (c) 2016 Dropbox, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","funding_links":[],"categories":["Image","C++"],"sub_categories":["Availability \u0026 compatability"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdropbox%2Flepton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdropbox%2Flepton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdropbox%2Flepton/lists"}