{"id":15272406,"url":"https://github.com/zitn/compress","last_synced_at":"2026-01-04T16:57:00.827Z","repository":{"id":57656362,"uuid":"457663141","full_name":"zitn/compress","owner":"zitn","description":"gin compress middleware all in one","archived":false,"fork":false,"pushed_at":"2022-02-15T04:38:45.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-27T19:28:40.944Z","etag":null,"topics":["br","compress","deflate","gin","gzip"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zitn.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}},"created_at":"2022-02-10T06:48:55.000Z","updated_at":"2022-03-07T15:53:46.000Z","dependencies_parsed_at":"2022-08-26T05:51:39.000Z","dependency_job_id":null,"html_url":"https://github.com/zitn/compress","commit_stats":null,"previous_names":["zigitn/compress"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitn%2Fcompress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitn%2Fcompress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitn%2Fcompress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitn%2Fcompress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zitn","download_url":"https://codeload.github.com/zitn/compress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244990069,"owners_count":20543614,"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":["br","compress","deflate","gin","gzip"],"created_at":"2024-09-30T09:06:14.447Z","updated_at":"2026-01-04T16:57:00.773Z","avatar_url":"https://github.com/zitn.png","language":"Go","readme":"# compress\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/zigitn/compress)](https://goreportcard.com/report/github.com/zigitn/compress)\n\nan easy use compress middleware for gin.\n\n# usage\nUse `compress.New()` to create a compress middleware, it's accept an option, you can use `compress.UseAllBestSpeed()` to use all method and set them for best speed, or use `compress.UseAllBestCompression()`\nto use all method but set them for best compression. if you want highly customizable, you can define your own `Option`.  \nBy default, the methods order is `br`,`gzip`,`deflate`, if you like to change the order, you can define `Option` and change `Option.EnableMethods`.\n\n# example\n```go\npackage main\n\nimport (\n    \"github.com/gin-gonic/gin\"\n    \"github.com/zigitn/compress\"\n)\n\nfunc main() {\n    router := gin.Default()\n    router.Use(compress.New(compress.UseAllBestSpeed()))\n    router.GET(\"/\", func(c *gin.Context) {\n        c.String(200, \"Hello World\")\n    })\n    router.Run()\n}\n```\n\n# thanks\n[gin-contrib/gzip](https://github.com/gin-contrib/gzip)  \n[anargu/gin-brotli](https://github.com/anargu/gin-brotli)  ","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzitn%2Fcompress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzitn%2Fcompress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzitn%2Fcompress/lists"}