{"id":18055980,"url":"https://github.com/grahamedgecombe/pgflate","last_synced_at":"2025-08-15T22:43:03.467Z","repository":{"id":66305311,"uuid":"79591247","full_name":"grahamedgecombe/pgflate","owner":"grahamedgecombe","description":"PostgreSQL module for raw DEFLATE compression/decompression with preset dictionary support","archived":false,"fork":false,"pushed_at":"2017-10-05T16:43:36.000Z","size":12,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T02:04:13.546Z","etag":null,"topics":["deflate","postgresql","zlib"],"latest_commit_sha":null,"homepage":"https://www.grahamedgecombe.com/projects/pgflate","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grahamedgecombe.png","metadata":{"files":{"readme":"README.markdown","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":"2017-01-20T19:36:27.000Z","updated_at":"2023-03-08T14:40:23.000Z","dependencies_parsed_at":"2023-02-20T21:00:38.367Z","dependency_job_id":null,"html_url":"https://github.com/grahamedgecombe/pgflate","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grahamedgecombe%2Fpgflate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grahamedgecombe%2Fpgflate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grahamedgecombe%2Fpgflate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grahamedgecombe%2Fpgflate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grahamedgecombe","download_url":"https://codeload.github.com/grahamedgecombe/pgflate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248328168,"owners_count":21085261,"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":["deflate","postgresql","zlib"],"created_at":"2024-10-31T01:13:07.123Z","updated_at":"2025-04-11T02:06:35.938Z","avatar_url":"https://github.com/grahamedgecombe.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pgflate\n\n## Introduction\n\npgflate is a PostgreSQL extension that provides functions for deflating and\ninflating raw DEFLATE streams, with support for custom dictionaries.\n\n## Prerequisites\n\n* PostgreSQL headers, libraries and PGXS build infrastructure\n* `pg_config` must be in your `PATH`\n* zlib\n\n## Building\n\nRun `make` to build the extension.\n\n## Installation\n\nRun `make install` as `root` (e.g. with `sudo`) to install the extension.\n\n## Debian package\n\nThe repository also contains the files for building a Debian package, which can\nbe done by running `pg_buildext updatecontrol` followed by `dpkg-buildpackage`.\nI distribute pre-built versions for stable amd64 Debian using the\n[apt.postgresql.org][pgapt] repository in my [personal APT repository][apt]. Run\n`apt-get install postgresql-PGVERSION-flate` as root after setting up the\nrepository.\n\n## Usage\n\nRun `CREATE EXTENSION flate` to install the extension in the current database.\nTwo functions are provided:\n\n| Function                                                                       | Return Type |\n|--------------------------------------------------------------------------------|-------------|\n| \u003ccode\u003edeflate(*data* bytea [, *dictionary* bytea [, *level* integer ]])\u003c/code\u003e | `bytea`     |\n| \u003ccode\u003einflate(*data* bytea [, *dictionary* bytea ])\u003c/code\u003e                     | `bytea`     |\n\n`deflate` compresses the provided `data` and returns a raw DEFLATE stream. A\npreset `dictionary` may also be provided. The default compression `level` may\nalso be overriden, valid values range from `0` (no compression), `1` (best\nspeed) to `9` (best compression).\n\nIf you want to override the compression level without using a dictionary, set\n`dictionary` to `NULL`.\n\n`inflate` decompresses the provided DEFLATE stream in `data` and returns the\nuncompressed data. A preset `dictionary`, matching the dictionary used to\ndeflate the data, may also be provided.\n\n## Example\n\n    gpe=# CREATE EXTENSION flate;\n    CREATE EXTENSION\n    gpe=# SELECT deflate('hello hello hello hello', 'hello', 9);\n         deflate\n    ------------------\n     \\xcb00110a182400\n    (1 row)\n\n    gpe=# SELECT convert_from(inflate('\\xcb00110a182400', 'hello'), 'utf-8');\n          convert_from\n    -------------------------\n     hello hello hello hello\n    (1 row)\n\n    gpe=#\n\n## License\n\nThis project is available under the terms of the ISC license, which is similar\nto the 2-clause BSD license. See the `LICENSE` file for the copyright\ninformation and licensing terms.\n\n[pgapt]: https://wiki.postgresql.org/wiki/Apt\n[apt]: https://www.grahamedgecombe.com/apt-repository\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrahamedgecombe%2Fpgflate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrahamedgecombe%2Fpgflate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrahamedgecombe%2Fpgflate/lists"}