{"id":34251976,"url":"https://github.com/dfgordon/retrocompressor","last_synced_at":"2025-12-16T10:55:51.493Z","repository":{"id":188110758,"uuid":"678124064","full_name":"dfgordon/retrocompressor","owner":"dfgordon","description":"compress and expand using retro formats","archived":false,"fork":false,"pushed_at":"2024-12-07T18:24:17.000Z","size":337,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-28T21:16:06.163Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/dfgordon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2023-08-13T18:57:51.000Z","updated_at":"2025-05-19T12:23:12.000Z","dependencies_parsed_at":"2024-09-08T14:11:25.302Z","dependency_job_id":null,"html_url":"https://github.com/dfgordon/retrocompressor","commit_stats":null,"previous_names":["dfgordon/retrocompressor"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/dfgordon/retrocompressor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfgordon%2Fretrocompressor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfgordon%2Fretrocompressor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfgordon%2Fretrocompressor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfgordon%2Fretrocompressor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dfgordon","download_url":"https://codeload.github.com/dfgordon/retrocompressor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfgordon%2Fretrocompressor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27763240,"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","status":"online","status_checked_at":"2025-12-16T02:00:10.477Z","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":[],"created_at":"2025-12-16T10:55:50.814Z","updated_at":"2025-12-16T10:55:51.484Z","avatar_url":"https://github.com/dfgordon.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# retrocompressor\n\n![unit tests](https://github.com/dfgordon/retrocompressor/actions/workflows/rust.yml/badge.svg)\n\nThe starting motivation for this project is to provide a library that aids in the handling of TD0 files (Teledisk-compatible disk images).  It is envisioned that the scope will expand over time.\n\n* `direct_ports::lzhuf` - nearly a direct port of the classic `LZHUF` of Okumura et al.\n* `lzss_huff` - signficant rewrite of `LZHUF` with flexible parameters\n* `lzw` - LZW with fixed code width, other parameters flexible\n* `td0` - convert normal Teledisk to advanced Teledisk, or vice-versa\n\n## Size Limits\n\nThis is not optimized for large files.  Some 32-bit integers used to describe file sizes have been retained since they are part of the format.  The maximum size, beyond which an error is returned, defaults to 3 MB for TD0 files, 1 GB otherwise.\n\n## Executable\n\nThe executable can be used to compress or expand files from the command line.  For example, to compress or expand a file using LZSS with adaptive Huffman coding:\n\n`retrocompressor compress -m lzss_huff -i \u003cbig.txt\u003e -o \u003csmall.lzh\u003e`\n\n`retrocompressor expand -m lzss_huff -i \u003csmall.lzh\u003e -o \u003cbig.txt\u003e`\n\nTo get the general help\n\n`retrocompressor --help`\n\n## Library\n\nThis crate can be used as a library.  For an example of how to use the library see `main.rs` (which calls into `lib.rs` per the usual rust arrangement).  Also see the [crate documentation](https://docs.rs/retrocompressor/latest/retrocompressor).\n\n## Teledisk\n\nTeledisk images come in an \"advanced\" variety that uses LZW (v1.x) or LZSS/Huffman (v2.x) compression.  Module `lzw` handles the former case, while module `lzss_huff` handles the latter.  However, options need to be set correctly, and the Teledisk header needs to be modified whenever advanced compression is added or subtracted.  As a convenience there is a module `td0` that handles all known cases transparently.  This can also be accessed from the command line:\n\n`retrocompressor compress -m td0 -i \u003cnormal.td0\u003e -o \u003cadvanced.td0\u003e`\n\n`retrocompressor expand -m td0 -i \u003cadvanced.td0\u003e -o \u003cnormal.td0\u003e`\n\n### Important\n\nAdvanced TD0 images in v2.x do not record the length of the expanded data. As a result, some decoders have trouble decoding the last symbol.  The workaround is to pad the *expanded* TD0 with several disparate-valued bytes *before* compression.  Teledisk evidently did this, so normally there is no problem, but if you are a creator of TD0 images, it is a good idea to include the padding.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfgordon%2Fretrocompressor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdfgordon%2Fretrocompressor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfgordon%2Fretrocompressor/lists"}