{"id":21832615,"url":"https://github.com/hattya/zopflipy","last_synced_at":"2025-08-03T14:34:52.599Z","repository":{"id":31856400,"uuid":"35423727","full_name":"hattya/zopflipy","owner":"hattya","description":"A Python bindings for Zopfli","archived":false,"fork":false,"pushed_at":"2025-02-09T13:28:52.000Z","size":102,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T21:11:49.028Z","etag":null,"topics":["compression","python","zlib","zopfli"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/hattya.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2015-05-11T12:54:27.000Z","updated_at":"2025-02-09T13:28:55.000Z","dependencies_parsed_at":"2024-06-21T12:56:03.029Z","dependency_job_id":"6686d364-ee11-4175-b3f5-cbc2dcb3f5c3","html_url":"https://github.com/hattya/zopflipy","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hattya%2Fzopflipy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hattya%2Fzopflipy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hattya%2Fzopflipy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hattya%2Fzopflipy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hattya","download_url":"https://codeload.github.com/hattya/zopflipy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248840486,"owners_count":21169996,"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","python","zlib","zopfli"],"created_at":"2024-11-27T19:24:23.547Z","updated_at":"2025-04-14T07:37:25.320Z","avatar_url":"https://github.com/hattya.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"ZopfliPy\n========\n\nA Python_ bindings for Zopfli_.\n\n.. image:: https://img.shields.io/pypi/v/zopflipy.svg\n   :target: https://pypi.org/project/zopflipy\n\n.. image:: https://github.com/hattya/zopflipy/actions/workflows/ci.yml/badge.svg\n   :target: https://github.com/hattya/zopflipy/actions/workflows/ci.yml\n\n.. image:: https://ci.appveyor.com/api/projects/status/98a7e7d6qlkvs6vl/branch/master?svg=true\n   :target: https://ci.appveyor.com/project/hattya/zopflipy\n\n.. image:: https://codecov.io/gh/hattya/zopflipy/branch/master/graph/badge.svg\n   :target: https://codecov.io/gh/hattya/zopflipy\n\n.. _Python: https://www.python.org/\n.. _Zopfli: https://github.com/google/zopfli\n\n\nInstallation\n------------\n\n.. code:: console\n\n   $ pip install zopflipy\n\n\nRequirements\n------------\n\n- Python 3.9+\n\n\nUsage\n-----\n\nZopfliCompressor\n~~~~~~~~~~~~~~~~\n\n.. code:: pycon\n\n   \u003e\u003e\u003e import zopfli\n   \u003e\u003e\u003e c = zopfli.ZopfliCompressor(zopfli.ZOPFLI_FORMAT_DEFLATE)\n   \u003e\u003e\u003e z = c.compress(b'Hello, world!') + c.flush()\n   \u003e\u003e\u003e d = zopfli.ZopfliDecompressor(zopfli.ZOPFLI_FORMAT_DEFLATE)\n   \u003e\u003e\u003e d.decompress(z) + d.flush()\n   b'Hello, world!''\n\n\nZopfliDeflater\n~~~~~~~~~~~~~~\n\n.. code:: pycon\n\n   \u003e\u003e\u003e import zopfli\n   \u003e\u003e\u003e c = zopfli.ZopfliDeflater()\n   \u003e\u003e\u003e z = c.compress(b'Hello, world!') + c.flush()\n   \u003e\u003e\u003e d = zopfli.ZopfliDecompressor(zopfli.ZOPFLI_FORMAT_DEFLATE)\n   \u003e\u003e\u003e d.decompress(z) + d.flush()\n   b'Hello, world!''\n\n\nZopfliPNG\n~~~~~~~~~\n\n.. code:: pycon\n\n   \u003e\u003e\u003e import zopfli\n   \u003e\u003e\u003e png = zopfli.ZopfliPNG()\n   \u003e\u003e\u003e with open('in.png', 'rb') as fp:\n   ...     data = fp.read()\n   \u003e\u003e\u003e len(png.optimize(data)) \u003c len(data)\n   True\n\n\nZipFile\n~~~~~~~\n\nA subclass of |zipfile.ZipFile|_ which uses |ZopfliCompressor|_ for the\n|zipfile.ZIP_DEFLATED|_ compression method.\n\n.. code:: pycon\n\n   \u003e\u003e\u003e import zipfile\n   \u003e\u003e\u003e import zopfli\n   \u003e\u003e\u003e with zopfli.ZipFile('a.zip', 'w', zipfile.ZIP_DEFLATED) as zf:\n   ...     zf.writestr('a.txt', b'Hello, world!')\n\n\n.. |zipfile.ZipFile| replace:: ``zipfile.ZipFile``\n.. _zipfile.ZipFile: https://docs.python.org/3/library/zipfile.html#zipfile.ZipFile\n.. |ZopfliCompressor| replace:: ``ZopfliCompressor``\n.. |zipfile.ZIP_DEFLATED| replace:: ``zipfile.ZIP_DEFLATED``\n.. _zipfile.ZIP_DEFLATED: https://docs.python.org/3/library/zipfile.html#zipfile.ZIP_DEFLATED\n\n\nLicense\n-------\n\nZopfliPy is distributed under the terms of the Apache License, Version 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhattya%2Fzopflipy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhattya%2Fzopflipy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhattya%2Fzopflipy/lists"}