{"id":50341167,"url":"https://github.com/gomdimapps/slimmer","last_synced_at":"2026-05-29T17:01:15.933Z","repository":{"id":358264084,"uuid":"1240371721","full_name":"GomdimApps/Slimmer","owner":"GomdimApps","description":"Slimmer is a high-performance PHP library for advanced file compression and PDF optimization. It provides a fluent API to seamlessly compress PDFs and images (JPG, PNG) using Ghostscript, featuring auto-dimensioning to prevent canvas issues, stream support","archived":false,"fork":false,"pushed_at":"2026-05-16T13:27:39.000Z","size":389,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-16T15:43:44.268Z","etag":null,"topics":["ghostscript","image-compression","optimization-tools","pdf-compressor","pdf-optimization","php"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/gomdim-apps/slimmer","language":"PHP","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/GomdimApps.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-16T04:06:29.000Z","updated_at":"2026-05-16T14:57:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/GomdimApps/Slimmer","commit_stats":null,"previous_names":["gomdimapps/slimmer"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/GomdimApps/Slimmer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GomdimApps%2FSlimmer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GomdimApps%2FSlimmer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GomdimApps%2FSlimmer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GomdimApps%2FSlimmer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GomdimApps","download_url":"https://codeload.github.com/GomdimApps/Slimmer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GomdimApps%2FSlimmer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33662205,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ghostscript","image-compression","optimization-tools","pdf-compressor","pdf-optimization","php"],"created_at":"2026-05-29T17:01:15.104Z","updated_at":"2026-05-29T17:01:15.928Z","avatar_url":"https://github.com/GomdimApps.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"docs/_media/logo.png\" alt=\"Slimmer Logo\" width=\"180\" /\u003e\n\u003c/div\u003e\n\n# Slimmer\n\n\u003e Advanced file compression for PHP — PDF · Images · Archives\n\nA PHP library for compressing PDFs, images, and directories with minimal dependencies. Uses [Ghostscript](https://www.ghostscript.com/) for PDFs, PHP's `ext-gd` for images, and system `tar` for archives.\n\n[![Packagist](https://img.shields.io/packagist/v/gomdim-apps/slimmer)](https://packagist.org/packages/gomdim-apps/slimmer)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\n## Quick Start\n\n```bash\ncomposer require gomdim-apps/slimmer\n```\n\n### PDF Optimization\n\n```php\nuse GomdimApps\\Slimmer\\Optimizers\\PdfOptimizer;\n\n$ratio = (new PdfOptimizer())\n    -\u003ewithQuality('screen')\n    -\u003eoptimize('input.pdf', 'output.pdf');\n```\n\n### Image Compression\n\n```php\nuse GomdimApps\\Slimmer\\Optimizers\\ImageOptimizer;\n\n$ratio = (new ImageOptimizer())\n    -\u003ewithQuality(75)\n    -\u003eoptimize('input.jpg', 'output.jpg');\n```\n\n### Tar Archiving\n\n```php\nuse GomdimApps\\Slimmer\\Optimizers\\CompressTar;\n\n$ratio = (new CompressTar())\n    -\u003ewithFormat('zst')\n    -\u003eoptimize('/path/to/dir', 'output.tar.zst');\n```\n\n## Requirements\n\n- **PHP**: \u003e= 8.2\n- **ext-gd**: For image compression\n- **Ghostscript** (`gs`): For PDF optimization\n- **tar**: For archiving\n- **zstd** *(optional)*: For `.tar.zst` compression\n\n## Features\n\n- 📦 **PDF optimization** with quality presets\n- 🖼️ **Image compression** (JPG, PNG)\n- 📂 **Tar archiving** (`.tar.gz`, `.tar.zst`)\n- 💾 **In-memory I/O** via `fromString()` / `fromStream()`\n- 🔍 **Dry-run mode** for command inspection\n- ⏱️ **Timeout control** to prevent runaway processes\n- 🎯 **Retention management** for archives\n\n## Documentation\n\nFull documentation is available at [**GomdimApps.github.io/Slimmer**](https://GomdimApps.github.io/Slimmer)\n\nKey sections:\n- [Installation \u0026 Requirements](https://GomdimApps.github.io/Slimmer/#/installation)\n- [PDF Optimizer](https://GomdimApps.github.io/Slimmer/#/pdf-optimizer)\n- [Image Optimizer](https://GomdimApps.github.io/Slimmer/#/image-optimizer)\n- [Tar Compression](https://GomdimApps.github.io/Slimmer/#/tar-compression)\n- [Streams \u0026 Buffers](https://GomdimApps.github.io/Slimmer/#/streams-buffers)\n- [Error Handling](https://GomdimApps.github.io/Slimmer/#/error-handling)\n- [Troubleshooting](https://GomdimApps.github.io/Slimmer/#/troubleshooting)\n\n## Docker Testing\n\nRun the test suite in an isolated environment:\n\n```bash\nmake test\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgomdimapps%2Fslimmer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgomdimapps%2Fslimmer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgomdimapps%2Fslimmer/lists"}