{"id":33397033,"url":"https://github.com/ccianos/byterep","last_synced_at":"2026-06-11T17:31:02.485Z","repository":{"id":231304245,"uuid":"781421695","full_name":"ccianos/byterep","owner":"ccianos","description":"Encode and decode jpg images and display them using Unicode representation.","archived":false,"fork":false,"pushed_at":"2025-11-03T10:17:43.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-23T11:08:29.220Z","etag":null,"topics":["cli","command-line","decoding","encoding","go","golang-examples","images","jpg","representation","unicode","unicode-characters"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ccianos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2024-04-03T10:55:47.000Z","updated_at":"2025-11-03T10:17:47.000Z","dependencies_parsed_at":"2024-04-03T12:26:57.213Z","dependency_job_id":"a08ec974-1006-45ab-968b-336c10918079","html_url":"https://github.com/ccianos/byterep","commit_stats":null,"previous_names":["ccianos/byterep"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ccianos/byterep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccianos%2Fbyterep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccianos%2Fbyterep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccianos%2Fbyterep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccianos%2Fbyterep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ccianos","download_url":"https://codeload.github.com/ccianos/byterep/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccianos%2Fbyterep/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34211061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cli","command-line","decoding","encoding","go","golang-examples","images","jpg","representation","unicode","unicode-characters"],"created_at":"2025-11-23T11:03:52.827Z","updated_at":"2026-06-11T17:31:02.463Z","avatar_url":"https://github.com/ccianos.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ByteRep\n\nThis is a simple command-line tool for encoding and decoding JPEG and PNG images to and from bytes, with an option to display images on the command-line using Unicode characters.\n\n## Installation\n\nClone the repository and build the executable:\n\n```bash\ngit clone https://github.com/ccianos/byterep.git\ncd byterep\ngo build -o byterep\n```\n\n## Usage\n\n### Encode an Image\n\nEncode an image to bytes. The original format (JPEG or PNG) is preserved in the byte output.\n\n```bash\n# Encode a JPEG\n./byterep -encode -input input_image.jpg \u003e encoded_image.txt\n\n# Encode a PNG\n./byterep -encode -input input_image.png \u003e encoded_image.txt\n```\n\n### Decode an Image (Smart Output)\n\nThe `-decode` command is now TTY-aware. It changes behavior based on whether you're viewing it in a terminal or redirecting the output to a file.\n\n1. Display as Unicode (in Terminal)\nWhen you run `-decode` and the output is your terminal, it will display the image using Unicode characters.\n\n```bash\n# Display an encoded file as Unicode\n./byterep -decode -input encoded_image.txt\n\n# You can also display an original image file directly as Unicode\n./byterep -decode -input input_image.jpg\n\n./byterep -decode -input input_image.png\n```\n\n2. Reconstruct Image File (Redirected Output)\nWhen you redirect the output (using `\u003e`), the command writes the raw image bytes, reconstructing the original file.\n\n**Note:** Ensure your output file extension (.jpg or .png) matches the format of the original image you encoded.\n\n```bash\n# Reconstruct a JPEG image\n./byterep -decode -input encoded_image.txt \u003e decoded_image.jpg\n\n# Reconstruct a PNG image\n./byterep -decode -input encoded_image.txt \u003e decoded_image.png\n```\n\n3. Force Display of Unicode Text (Redirected Output)\n\n```bash\n# You can force Unicode text on redirected output\n./byterep -decode -unicode -input input_image.jpg \u003e unicode_output.txt\n\n./byterep -decode -unicode -input input_image.png \u003e unicode_output.txt\n\n./byterep -decode -unicode -input encoded_image.txt \u003e unicode_output.txt\n```\n\n## Options\n\n- `-encode`: Encode the input **JPEG** or **PNG** image to bytes\n- `-decode`: Decode the encoded data. **Displays as Unicode to a terminal, or writes raw image bytes if redirected.**\n- `-unicode`: **Force** Unicode text output, even when redirecting.\n- `-input`: Input file path\n- `-help`: Show help message\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccianos%2Fbyterep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fccianos%2Fbyterep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccianos%2Fbyterep/lists"}