{"id":15180581,"url":"https://github.com/tsegismont/streamutils","last_synced_at":"2025-03-02T05:31:32.312Z","repository":{"id":37262049,"uuid":"204981079","full_name":"tsegismont/streamutils","owner":"tsegismont","description":"Simple tools for Vert.x streams manipulation","archived":true,"fork":false,"pushed_at":"2025-01-29T08:59:09.000Z","size":45,"stargazers_count":5,"open_issues_count":4,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-17T02:01:41.764Z","etag":null,"topics":["groovy","java","kotlin","streams","utilities","vertx"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/tsegismont.png","metadata":{"files":{"readme":"README.adoc","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":"2019-08-28T16:55:47.000Z","updated_at":"2025-01-29T12:52:36.000Z","dependencies_parsed_at":"2022-08-24T07:11:10.057Z","dependency_job_id":null,"html_url":"https://github.com/tsegismont/streamutils","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsegismont%2Fstreamutils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsegismont%2Fstreamutils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsegismont%2Fstreamutils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsegismont%2Fstreamutils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsegismont","download_url":"https://codeload.github.com/tsegismont/streamutils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241465006,"owners_count":19967238,"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":["groovy","java","kotlin","streams","utilities","vertx"],"created_at":"2024-09-27T16:23:03.981Z","updated_at":"2025-03-02T05:31:32.304Z","avatar_url":"https://github.com/tsegismont.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Vert.x Streams utilities\n:group-id: io.github.tsegismont\n:artifact-id: streamutils\n:version: 1.0.0\n:streams-class: io.github.tsegismont.streamutils.Streams\n\nA set of utilities for Vert.x streams.\n\nNOTE: This project is no longer maintained. If you need to manipulate streams, consider libraries like https://smallrye.io/smallrye-mutiny/latest/[SmallRye Mutiny] or https://github.com/ReactiveX/RxJava[RxJava].\nIn Kotlin, with coroutines, consider utilities like https://kotlinlang.org/docs/channels.html[Channels].\n\n== Purpose\n\nProvide tools for simple transformations of stream data (e.g. `map`, `filter`, `skip`).\n\nFor anything beyond simple transformations, consider using a https://www.reactive-streams.org/[Reactive Streams] implementation like https://github.com/ReactiveX/RxJava[RxJava].\n\n== Dependency setup\n\n=== Maven\n\n[source,xml,subs=\"attributes+\"]\n----\n\u003cdependency\u003e\n  \u003cgroupId\u003e{group-id}\u003c/groupId\u003e\n  \u003cartifactId\u003e{artifact-id}\u003c/artifactId\u003e\n  \u003cversion\u003e{version}\u003c/version\u003e\n\u003c/dependency\u003e\n----\n\n=== Gradle Kotlin DSL\n\n[source,kotlin,subs=\"attributes+\"]\n----\nimplementation(\"{group-id}:{artifact-id}:{version}\")\n----\n\n=== Gradle Groovy DSL:\n\n[source,groovy,subs=\"attributes+\"]\n----\nimplementation '{group-id}:{artifact-id}:{version}'\n----\n\n== Usage\n\n=== Java\n\nImport the `{streams-class}` class.\n\nThen use operators to transform streams.\nHere's an `io.vertx.core.file.AsyncFile` transformation example:\n\n[source,java]\n----\n// Splits file content into lines\nRecordParser parser = RecordParser.newDelimited(\"\\n\", asyncFile);\n// Transform line bytes to String\nReadStream\u003cString\u003e lines = Streams.map(parser, Buffer::toString);\n// Get the line length\nReadStream\u003cInteger\u003e sizes = Streams.map(lines, String::length);\n// Skip the first 50 lines\nReadStream\u003cInteger\u003e skipped = Streams.skip(sizes, 50);\n// Limit result to 150 lines\nReadStream\u003cInteger\u003e result = Streams.limit(skipped, 150);\n----\n\n=== Groovy\n\nThis library comes with a Groovy extension module that adds operators to Vert.x streams.\nHere's an `io.vertx.core.file.AsyncFile` transformation example:\n\n[source,groovy]\n----\n// Splits file content into lines\ndef parser = RecordParser.newDelimited(\"\\n\", asyncFile)\n\ndef result = parser\n  // Transform line bytes to String\n  .map { Buffer buffer -\u003e buffer.toString() }\n  // Get the line length\n  .map { String line -\u003e line.length() }\n  // Skip the first 50 lines\n  .skip(50)\n  // Limit result to 150 lines\n  .limit(150)\n----\n\n=== Kotlin\n\nThis library comes with Kotlin extension functions that add operators to Vert.x streams.\nHere's an `io.vertx.core.file.AsyncFile` transformation example:\n\n[source,kotlin]\n----\n// Splits file content into lines\nval parser = RecordParser.newDelimited(\"\\n\", asyncFile)\n\nval result = parser\n  // Transform line bytes to String\n  .map(Buffer::toString)\n  // Get the line length\n  .map(String::length)\n  // Skip the first 50 lines\n  .skip(50)\n  // Limit result to 150 lines\n  .limit(150)\n----\n\n== License\n\nApache License version 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsegismont%2Fstreamutils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsegismont%2Fstreamutils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsegismont%2Fstreamutils/lists"}