{"id":18894581,"url":"https://github.com/redthing1/streamz","last_synced_at":"2026-03-19T07:00:40.980Z","repository":{"id":156959793,"uuid":"524236043","full_name":"redthing1/streamz","owner":"redthing1","description":null,"archived":false,"fork":false,"pushed_at":"2022-08-12T22:22:04.000Z","size":52,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-03T03:03:05.956Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redthing1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-12T22:05:56.000Z","updated_at":"2022-08-15T17:04:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"88256772-0c5a-4528-9932-165ab5bf4839","html_url":"https://github.com/redthing1/streamz","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/redthing1/streamz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redthing1%2Fstreamz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redthing1%2Fstreamz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redthing1%2Fstreamz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redthing1%2Fstreamz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redthing1","download_url":"https://codeload.github.com/redthing1/streamz/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redthing1%2Fstreamz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28989433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T20:36:14.625Z","status":"ssl_error","status_checked_at":"2026-02-01T20:36:11.271Z","response_time":56,"last_error":"SSL_read: 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-08T08:23:19.569Z","updated_at":"2026-02-01T20:37:13.405Z","avatar_url":"https://github.com/redthing1.png","language":"D","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# streamz\n\na stream IO library for D based on freck-streams abandoned source code.\n\n## MemoryStream\n\nSimple in-memory stream.\n\n```D\nimport std.stdio;\nimport streamz.face;\nimport streamz.memorystream;\n\nauto stream = MemoryStream.fromBytes(cast(ubyte[])\"Hello\", [\"Roses\": \"Are red\"]);\n\nstream.seek(0, Seek.end);\nstream.write(cast(ubyte[])\" World!\");\n\nwriteln(\"Roses: \", stream.getMetadata(\"Roses\"));\nwriteln(\"Stream content: \", cast(string)stream.getContents);\n```\n\n## FileStream\n\nSimple file stream built on top of `std.stdio.File`.\n\n```D\nimport std.stdio;\nimport streamz.face;\nimport streamz.filestream;\n\nauto stream = new FileStream(\"stream.txt\", \"w+b\", [\"Roses\": \"Are red\"]);\n\nstream.write(cast(ubyte[])\"Hello World!\");\nstream.seek(0, Seek.set);\n\nwriteln(\"Roses: \", stream.getMetadata(\"Roses\"));\n//.read(1024) Reads 1024 bytes or the whole stream to the end, if it is smaller.\nwriteln(\"Stream content: \", cast(string)stream.read(1024));\n```\n\n## AppendStream\n\nReads from multiple streams, one after the other.\n\n```D\nimport std.stdio;\nimport streamz.face;\nimport streamz.memorystream;\nimport streamz.appendstream;\n\nauto stream1 = MemoryStream.fromBytes(cast(ubyte[])\"Hello \");\nauto stream2 = MemoryStream.fromBytes(cast(ubyte[])\"World\");\nauto stream3 = MemoryStream.fromBytes(cast(ubyte[])\"!\");\n\nauto allTogether = new AppendStream([\n  stream1,\n  stream2,\n  stream3,\n]);\n\nwriteln(\"Stream content: \", cast(string)allTogether.getContents);\n```\n\n## Endianness\n\nEach stream has an endianness attribute with default value `Endian.platform`. This attribute affects on reading/writing scalar types from/to the stream.\n\n```D\nimport std.stdio;\nimport streamz.face;\nimport streamz.memorystream;\nimport streamz.util: readScalar;\n\nauto stream = MemoryStream.fromBytes(cast(ubyte[])[1, 2, 3, 4]);\n\nstream.setEndian(Endian.little);\nstream.seek(0);\nauto ret1 = stream.readScalar!uint;\nwritefln(\"Returns: %.8x\", ret1); //04030201\n\nstream.setEndian(Endian.big);\nstream.seek(0);\nauto ret2 = stream.readScalar!uint;\nwritefln(\"Returns: %.8x\", ret2); //01020304\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredthing1%2Fstreamz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredthing1%2Fstreamz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredthing1%2Fstreamz/lists"}