{"id":16613159,"url":"https://github.com/c-cube/poc-modular-io","last_synced_at":"2025-10-29T18:31:04.072Z","repository":{"id":54672484,"uuid":"282500999","full_name":"c-cube/poc-modular-io","owner":"c-cube","description":"proof of concept for https://github.com/ocaml/RFCs/pull/19","archived":false,"fork":false,"pushed_at":"2023-07-19T04:03:16.000Z","size":40,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T21:35:36.169Z","etag":null,"topics":["byte-stream","io","ocaml"],"latest_commit_sha":null,"homepage":"","language":"OCaml","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/c-cube.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}},"created_at":"2020-07-25T18:20:32.000Z","updated_at":"2023-07-19T03:46:31.000Z","dependencies_parsed_at":"2022-08-13T23:30:54.117Z","dependency_job_id":null,"html_url":"https://github.com/c-cube/poc-modular-io","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/c-cube%2Fpoc-modular-io","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-cube%2Fpoc-modular-io/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-cube%2Fpoc-modular-io/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-cube%2Fpoc-modular-io/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c-cube","download_url":"https://codeload.github.com/c-cube/poc-modular-io/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238864409,"owners_count":19543534,"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":["byte-stream","io","ocaml"],"created_at":"2024-10-12T01:46:08.376Z","updated_at":"2025-10-29T18:30:58.774Z","avatar_url":"https://github.com/c-cube.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# poc-modular-io\n\n[![build](https://github.com/c-cube/poc-modular-io/actions/workflows/main.yml/badge.svg)](https://github.com/c-cube/poc-modular-io/actions/workflows/main.yml)\n\nproof of concept for https://github.com/ocaml/RFCs/pull/19\n\n## Examples\n\nThe `multicat.sh` tool is like `cat`, but provides options to encode/decode various things.\n\n```sh\n$ echo \"hello\\nworld\\n🤗\" \u003e foo\n\n$ ./multicat.sh foo foo foo -rot13\nuryyb\\ajbeyq\\a🤗\nuryyb\\ajbeyq\\a🤗\nuryyb\\ajbeyq\\a🤗\n\n$ ./multicat.sh foo foo foo -rot13 \u003e bar  # save it into a file\n\n$ ./multicat.sh bar -rot13 -rot13 -rot13  # triple decode!\nhello\\nworld\\n🤗\nhello\\nworld\\n🤗\nhello\\nworld\\n🤗\n```\n\nThe following example reads a file, translates it via \"rot13\", then uses\nthe http1.1 chunked encoding; then the rest of the pipeline decodes the\nchunked encoding and rot13.\n\nNote that the pipeline runs in constant memory, it does\nnot need to read the whole file to do its translations.\n\n```sh\n$ cat src/IO_helpers.ml\n… # some content\n\n$ ./multicat.sh src/IO_helpers.ml -rot13 -chunk\n… # content, but less readable\n\n$ ./multicat.sh src/IO_helpers.ml -rot13 -chunk | ./multicat.sh -unchunk -rot13\n… # initial content of the file\n\n```\n\n## Bugs\n\n`-zip` and `-unzip` don't work yet, I haven't updated them.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc-cube%2Fpoc-modular-io","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc-cube%2Fpoc-modular-io","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc-cube%2Fpoc-modular-io/lists"}