{"id":19689133,"url":"https://github.com/kjdev/php-ext-snappy","last_synced_at":"2025-04-04T19:09:57.370Z","repository":{"id":4094321,"uuid":"5202266","full_name":"kjdev/php-ext-snappy","owner":"kjdev","description":"Snappy Extension for PHP","archived":false,"fork":false,"pushed_at":"2024-11-25T21:47:26.000Z","size":1239,"stargazers_count":133,"open_issues_count":9,"forks_count":36,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-28T18:14:29.224Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","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/kjdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING.snappy","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":"2012-07-27T08:25:55.000Z","updated_at":"2025-03-13T16:17:50.000Z","dependencies_parsed_at":"2023-12-18T02:24:06.416Z","dependency_job_id":"1c9de6c5-3c44-49ef-a5b7-613ee37f3115","html_url":"https://github.com/kjdev/php-ext-snappy","commit_stats":{"total_commits":71,"total_committers":10,"mean_commits":7.1,"dds":0.295774647887324,"last_synced_commit":"b27283507faba958381ab9c714a84962131d3699"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjdev%2Fphp-ext-snappy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjdev%2Fphp-ext-snappy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjdev%2Fphp-ext-snappy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kjdev%2Fphp-ext-snappy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kjdev","download_url":"https://codeload.github.com/kjdev/php-ext-snappy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234921,"owners_count":20905854,"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":[],"created_at":"2024-11-11T18:42:54.244Z","updated_at":"2025-04-04T19:09:57.345Z","avatar_url":"https://github.com/kjdev.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# Snappy Extension for PHP\n\n[![Linux](https://github.com/kjdev/php-ext-snappy/workflows/Linux/badge.svg?branch=master)](https://github.com/kjdev/php-ext-snappy/actions?query=workflow%3ALinux+branch%3Amaster)\n[![Windows](https://github.com/kjdev/php-ext-snappy/workflows/Windows/badge.svg?branch=master)](https://github.com/kjdev/php-ext-snappy/actions?query=workflow%3AWindows+branch%3Amaster)\n\nThis extension allows Snappy.\n\nDocumentation for Snappy can be found at\n[» http://google.github.io/snappy/](http://google.github.io/snappy/).\n\n## Build from sources\n\n```shell\ngit clone --recursive --depth=1 https://github.com/kjdev/php-ext-snappy.git\ncd php-ext-snappy\nphpize\n./configure\nmake\nmake install\n```\n\nTo use the system library\n\n```shell\n./configure --with-snappy-includedir=/usr\n```\n\n## Distribution binary packages\n\n### Fedora / CentOS / RHEL\n\nRPM packages of this extension are available in [» Remi's RPM repository](https://rpms.remirepo.net/) and are named **php-snappy**.\n\n## Configuration\n\nphp.ini:\n\n```ini\nextension=snappy.so\n```\n\n### Function : `snappy_compress()`\n\nstring snappy_compress( string $data )\n\n#### parameters\n\ndata:\n\n    The data to compress.\n\n#### return values\n\nThe compressed string or FALSE if an error occurred.\n\n### Function : `snappy_uncompress()`\n\nstring snappy_uncompress( string $data )\n\n#### parameters\n\nname:\n\n    The data compressed by snappy_compress(). \n\n#### return values\n\nThe original uncompressed data or FALSE on error.\n\n## Example\n\n```php\n$compressed = snappy_compress('Compress me');\n\n$uncompressed = snappy_uncompress($compressed);\n\necho $uncompressed;\n```\n\n## Troubleshooting\n\n### Ubuntu / OSX\n\nSnappy requires C++ and therefore might require for you to install the g++ or build-essential package. \n    \nIf you get an error about \"this file requires compiler and library support\" or [compilation errors on OSX](https://github.com/kjdev/php-ext-snappy/issues/19), you need to enforce the compilation with `-std=c++11` flag:\n\n```shell\nexport CXXFLAGS=-std=c++11\nphpize\n./configure\nmake\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkjdev%2Fphp-ext-snappy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkjdev%2Fphp-ext-snappy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkjdev%2Fphp-ext-snappy/lists"}