{"id":21484119,"url":"https://github.com/dylex/iteratees","last_synced_at":"2025-03-17T09:40:39.967Z","repository":{"id":19302487,"uuid":"22540049","full_name":"dylex/iteratees","owner":"dylex","description":"Tools built on play's iteratees, including ZipFile and other Enumeratee filters","archived":false,"fork":false,"pushed_at":"2018-01-12T15:00:36.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-23T19:14:35.126Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dylex.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":"2014-08-02T05:38:48.000Z","updated_at":"2018-01-12T15:00:07.000Z","dependencies_parsed_at":"2022-08-03T15:10:08.111Z","dependency_job_id":null,"html_url":"https://github.com/dylex/iteratees","commit_stats":null,"previous_names":["databrary/iteratees"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylex%2Fiteratees","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylex%2Fiteratees/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylex%2Fiteratees/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylex%2Fiteratees/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dylex","download_url":"https://codeload.github.com/dylex/iteratees/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244010927,"owners_count":20383333,"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-11-23T12:50:13.527Z","updated_at":"2025-03-17T09:40:39.921Z","avatar_url":"https://github.com/dylex.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Iteratee utilities\n\n## Installation\n\nAdd the dependency:\n\n\u003e \"org.databrary\" %% \"iteratees\" % \"0.1\"\n\nYou can see examples of usage in the test cases.\n\n## ZipFile\n\nThese functions provide an interface to java.util.zip.ZipOutputStream in the form of an Enumeratee.\nThere are two main functions providing a higher-level and lower-level interface.\nBoth follow proper reactive semantics, never blocking (except possibly on IO).\nHowever, errors may still be delivered by thrown exceptions.\n\nAlso provided are some classes that provide more convenient ways of creating ZipEntries: `DirEntry`, `StoredEntry` and `DeflatedEntry`.\n\n### zip\n\nThe lower-level interface, `org.databrary.ZipFile.zip`, provides an `Enumeratee[Either[ZipEntry, Array[Byte]], Array[Byte]]` that converts an incoming sequence of `Left(ZipEntry)`, each followed by any number of `Right(data)` blocks, into a zip file.\nThis is equivalent to calling this sequence of `ZipOutputStream.setNextEntry` and `ZipOutputStream.write` on each item, so all the restrictions of those interfaces still apply.\n\n### flatZip\n\nThe higher-level interface, `org.databrary.ZipFile.flatZip`, provides a more convenient interface for creating zip streams out of different files or data sources.\nIt provides an `Enumeratee[ZipFile.StreamEntry, Array[Byte]]`, where a `StreamEntry` is a `ZipEntry` amended with an `Enumerator[Array[Byte]]`.\n\nTwo easy ways of creating StreamEntries are provided: `ZipFile.DirEntry` (which simply has no data content), and `ZipFile.fileEntry` which generates a StreamEntry from a file on disk.\nYou can also use `ZipFile.DeflatedStreamEntry` or define your own.\n\n## Enumeratee utilities\n\n### Range\n\nSimilar to a composition Enumeratee.take and Enumeratee.drop, `org.databrary.Enumeratee.range` is designed to work on Array[Byte] streams and counts individual bytes, allowing you to select an interior range of a byte stream.\n\n### FilterOutputStream\n\nUsed in the construction of zip files, `org.databrary.Enumeratee.filterOutputStream` allows you to wrap a `java.io.FilterOutputStream` in an Enumartee efficiently.\nUnlike Enumerator.outputStream, this follows correct Enumeratee semantics, so will push back and only accept input when more is needed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdylex%2Fiteratees","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdylex%2Fiteratees","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdylex%2Fiteratees/lists"}