{"id":17146092,"url":"https://github.com/emersion/go-imap-compress","last_synced_at":"2025-04-13T11:32:39.440Z","repository":{"id":56501260,"uuid":"59891364","full_name":"emersion/go-imap-compress","owner":"emersion","description":"The IMAP COMPRESS Extension for go-imap","archived":false,"fork":false,"pushed_at":"2020-11-03T19:02:59.000Z","size":15,"stargazers_count":2,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T12:16:15.817Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/emersion.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":"2016-05-28T11:28:21.000Z","updated_at":"2022-05-19T11:08:36.000Z","dependencies_parsed_at":"2022-08-15T20:00:18.394Z","dependency_job_id":null,"html_url":"https://github.com/emersion/go-imap-compress","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emersion%2Fgo-imap-compress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emersion%2Fgo-imap-compress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emersion%2Fgo-imap-compress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emersion%2Fgo-imap-compress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emersion","download_url":"https://codeload.github.com/emersion/go-imap-compress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248705671,"owners_count":21148574,"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-10-14T21:07:49.460Z","updated_at":"2025-04-13T11:32:39.405Z","avatar_url":"https://github.com/emersion.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-imap-compress\n\n[![GoDoc](https://godoc.org/github.com/emersion/go-imap-compress?status.svg)](https://godoc.org/github.com/emersion/go-imap-compress)\n\nThe [IMAP COMPRESS Extension](https://tools.ietf.org/html/rfc4978) for [go-imap](https://github.com/emersion/go-imap)\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\t\"log\"\n\n\t\t\"github.com/emersion/go-imap/client\"\n\t\t\"github.com/emersion/go-imap-compress\"\n)\n\nfunc main() {\n\tlog.Println(\"Connecting to server...\")\n\n\t// Connect to server\n\tc, err := client.DialTLS(\"mail.example.org:993\", nil)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tlog.Println(\"Connected\")\n\n\t// Don't forget to logout\n\tdefer c.Logout()\n\n\t// Login\n\tif err := c.Login(\"username\", \"password\"); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// Enable compression if possible\n\tcomp := compress.NewClient(c)\n\tif ok, err := comp.SupportCompress(compress.Deflate); err != nil {\n\t\tlog.Fatal(err)\n\t} else if ok {\n\t\tif err := comp.Compress(compress.Deflate); err != nil {\n\t\t\tlog.Fatal(err)\n\t\t} else {\n\t\t\tlog.Printf(\"Compression enabled: %t\", comp.IsCompress())\n\t\t}\n\t}\n\n\t// Continue using c with compression enabled\n}\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femersion%2Fgo-imap-compress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femersion%2Fgo-imap-compress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femersion%2Fgo-imap-compress/lists"}