{"id":19502318,"url":"https://github.com/zio/zio-streams-compress","last_synced_at":"2026-03-01T09:04:57.041Z","repository":{"id":258830872,"uuid":"875130955","full_name":"zio/zio-streams-compress","owner":"zio","description":"Compression algorithms and archive formats for zio-streams","archived":false,"fork":false,"pushed_at":"2026-02-26T00:02:08.000Z","size":302,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-02-26T01:48:55.712Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://zio.dev/zio-streams-compress","language":"Scala","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/zio.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":"CLA.md"}},"created_at":"2024-10-19T07:10:57.000Z","updated_at":"2026-02-24T01:29:07.000Z","dependencies_parsed_at":"2024-12-29T19:26:31.640Z","dependency_job_id":"c589fcf0-c913-41be-9ede-70ac557874fc","html_url":"https://github.com/zio/zio-streams-compress","commit_stats":null,"previous_names":["zio/zio-streams-compress"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/zio/zio-streams-compress","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zio%2Fzio-streams-compress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zio%2Fzio-streams-compress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zio%2Fzio-streams-compress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zio%2Fzio-streams-compress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zio","download_url":"https://codeload.github.com/zio/zio-streams-compress/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zio%2Fzio-streams-compress/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29964203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T06:55:38.174Z","status":"ssl_error","status_checked_at":"2026-03-01T06:53:04.810Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-10T22:16:04.333Z","updated_at":"2026-03-01T09:04:57.031Z","avatar_url":"https://github.com/zio.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"[//]: # (This file was autogenerated using `zio-sbt-website` plugin via `sbt generateReadme` command.)\n[//]: # (So please do not edit it manually. Instead, change \"docs/index.md\" file or sbt setting keys)\n[//]: # (e.g. \"readmeDocumentation\" and \"readmeSupport\".)\n\n# ZIO Streams Compress docs\n\n[ZIO Streams Compress](https://github.com/zio/zio-streams-compress) integrates several compression algorithms and\narchive formats with [ZIO Streams](https://zio.dev).\n\n[![Production Ready](https://img.shields.io/badge/Project%20Stage-Production%20Ready-brightgreen.svg)](https://github.com/zio/zio/wiki/Project-Stages) ![CI Badge](https://github.com/zio/zio-streams-compress/workflows/CI/badge.svg) [![Sonatype Releases](https://img.shields.io/nexus/r/https/oss.sonatype.org/dev.zio/zio-streams-compress-docs_2.13.svg?label=Sonatype%20Release)](https://oss.sonatype.org/content/repositories/releases/dev/zio/zio-streams-compress-docs_2.13/) [![Sonatype Snapshots](https://img.shields.io/nexus/s/https/oss.sonatype.org/dev.zio/zio-streams-compress-docs_2.13.svg?label=Sonatype%20Snapshot)](https://oss.sonatype.org/content/repositories/snapshots/dev/zio/zio-streams-compress-docs_2.13/) [![javadoc](https://javadoc.io/badge2/dev.zio/zio-streams-compress-docs_2.13/javadoc.svg)](https://javadoc.io/doc/dev.zio/zio-streams-compress-docs_2.13) [![ZIO Streams Compress docs](https://img.shields.io/github/stars/zio/zio-streams-compress?style=social)](https://github.com/zio/zio-streams-compress) [![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-blue.svg?style=flat\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org)\n\n## Installation\n\nIn order to use this library, we need to add one of the following line in our `build.sbt` file:\n\n```sbt\nlibraryDependencies += \"dev.zio\" %% \"zio-streams-compress-brotli\" % \"1.1.3\"\nlibraryDependencies += \"dev.zio\" %% \"zio-streams-compress-brotli4j\" % \"1.1.3\"\nlibraryDependencies += \"dev.zio\" %% \"zio-streams-compress-bzip2\" % \"1.1.3\"\nlibraryDependencies += \"dev.zio\" %% \"zio-streams-compress-gzip\" % \"1.1.3\"\nlibraryDependencies += \"dev.zio\" %% \"zio-streams-compress-lz4\" % \"1.1.3\"\nlibraryDependencies += \"dev.zio\" %% \"zio-streams-compress-snappy\" % \"1.1.3\"\nlibraryDependencies += \"dev.zio\" %% \"zio-streams-compress-tar\" % \"1.1.3\"\nlibraryDependencies += \"dev.zio\" %% \"zio-streams-compress-zip\" % \"1.1.3\"\nlibraryDependencies += \"dev.zio\" %% \"zio-streams-compress-zip4j\" % \"1.1.3\"\nlibraryDependencies += \"dev.zio\" %% \"zio-streams-compress-zstd\" % \"1.1.3\"\n```\n\nFor Brotli you can choose between the 'brotli' and the 'brotli4j' version. The first is based on the official Java\nlibrary but only does decompression. The second is based on [Brotli4J](https://github.com/hyperxpro/Brotli4j) which does\ncompression and decompression.\n\nFor ZIP files you can choose between the 'zip' and the 'zip4j' version. The first allows you to tweak the compression\nlevel, while the second allows you work with password-protected ZIP files.\n\nCurrently only jvm is supported. PRs for scala-js and scala-native are welcome.\n\n### Example\n\n```scala\n// Example.sc\n// Run with: scala-cli Example.sc\n//\u003e using dep dev.zio:zio-streams-compress-gzip:1.1.3\n//\u003e using dep dev.zio:zio-streams-compress-tar:1.1.3\n//\u003e using dep dev.zio:zio-streams-compress-zip4j:1.1.3\n\nimport zio._\nimport zio.compress.{ArchiveEntry, GzipCompressor, GzipDecompressor, TarUnarchiver, Zip4JArchiver}\nimport zio.stream._\n\nimport java.nio.charset.StandardCharsets.UTF_8\n\nobject ExampleApp extends ZIOAppDefault {\n  override def run: ZIO[Any, Any, Any] =\n    for {\n      // Compress a file with GZIP\n      _ \u003c- ZStream\n             .fromFileName(\"file\")\n             .via(GzipCompressor.compress)\n             .run(ZSink.fromFileName(\"file.gz\"))\n\n      // List all items in a gzip tar archive:\n      _ \u003c- ZStream\n             .fromFileName(\"file.tgz\")\n             .via(GzipDecompressor.decompress)\n             .via(TarUnarchiver.unarchive)\n             .mapZIO { case (archiveEntry, contentStream) =\u003e\n               for {\n                 content \u003c- contentStream.runCollect\n                 _ \u003c- Console.printLine(s\"${archiveEntry.name} ${content.length}\")\n               } yield ()\n             }\n             .runDrain\n\n      // Create an encrypted ZIP archive\n      _ \u003c- ZStream(archiveEntry(\"file1.txt\", \"Hello world!\".getBytes(UTF_8)))\n             .via(Zip4JArchiver(password = Some(\"it is a secret\")).archive)\n             .run(ZSink.fromFileName(\"file.zip\"))\n    } yield ()\n\n  private def archiveEntry(\n    name: String,\n    content: Array[Byte],\n  ): (ArchiveEntry[Some, Any], ZStream[Any, Throwable, Byte]) =\n    (ArchiveEntry(name, Some(content.length.toLong)), ZStream.fromIterable(content))\n\n}\n```\n\n## Running the tests\n\n```shell\nSBT_OPTS=\"-Xmx4G -XX:+UseG1GC\" sbt test\n```\n\n## Documentation\n\nLearn more on the [ZIO Streams Compress docs homepage](https://zio.dev/zio-streams-compress)!\n\n## Contributing\n\nFor the general guidelines, see ZIO [contributor's guide](https://zio.dev/contributor-guidelines).\n\n## Code of Conduct\n\nSee the [Code of Conduct](https://zio.dev/code-of-conduct)\n\n## Support\n\nCome chat with us on [![Badge-Discord]][Link-Discord].\n\n[Badge-Discord]: https://img.shields.io/discord/629491597070827530?logo=discord \"chat on discord\"\n[Link-Discord]: https://discord.gg/2ccFBr4 \"Discord\"\n\n## Credits\n\nThis library is heavily inspired by [fs2-compress](https://github.com/lhns/fs2-compress).\n\n## License\n\n[License](LICENSE)\n\nCopyright 2024-2026 Erik van Oosten and the zio-streams-compress contributors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzio%2Fzio-streams-compress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzio%2Fzio-streams-compress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzio%2Fzio-streams-compress/lists"}