{"id":16691900,"url":"https://github.com/ucyo/rscompress","last_synced_at":"2026-02-22T12:44:00.020Z","repository":{"id":54205766,"uuid":"334482951","full_name":"ucyo/rscompress","owner":"ucyo","description":"A compression library in Rust with focus on scientific data.","archived":false,"fork":false,"pushed_at":"2021-05-15T11:17:32.000Z","size":21761,"stargazers_count":1,"open_issues_count":17,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T02:48:14.267Z","etag":null,"topics":["approximation","checksums","coding","compression","decorrelation","encoding","floating-point","transformation"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/ucyo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-30T18:25:49.000Z","updated_at":"2023-03-13T01:30:38.000Z","dependencies_parsed_at":"2022-08-13T09:10:43.579Z","dependency_job_id":null,"html_url":"https://github.com/ucyo/rscompress","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/ucyo%2Frscompress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucyo%2Frscompress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucyo%2Frscompress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucyo%2Frscompress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ucyo","download_url":"https://codeload.github.com/ucyo/rscompress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247749976,"owners_count":20989712,"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":["approximation","checksums","coding","compression","decorrelation","encoding","floating-point","transformation"],"created_at":"2024-10-12T16:10:34.848Z","updated_at":"2025-10-24T04:21:33.942Z","avatar_url":"https://github.com/ucyo.png","language":"Rust","readme":"\u003ch1 align='center'\u003erscompress\u003c/h1\u003e\n\n\u003cp align=center\u003e\n  A compression library in Rust with focus on scientific data. \u003cbr\u003e\u003cbr\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/ucyo/rscompress/master/assets/logo.svg\" height=\"368\"/\u003e\n\u003c/p\u003e\n\n## Disclaimer\nThis is a rewrite and merge of several compression algorithms developed during my time as a phd student:\n\n- https://github.com/ucyo/huffman\n- https://github.com/ucyo/pzip-cli\n- https://github.com/ucyo/pzip-bwt\n- https://github.com/ucyo/pzip-redux\n- https://github.com/ucyo/pzip-huffman\n- https://github.com/ucyo/pzip\n- https://github.com/ucyo/rust-compress\n- https://github.com/ucyo/adaptive-lossy-compression\n- https://github.com/ucyo/information-spaces\n- https://github.com/ucyo/cframework\n- https://github.com/ucyo/xor-and-residual-calculation\n- https://github.com/ucyo/climate-data-analysis\n\nThe dissertation can be downloaded from https://doi.org/10.5445/IR/1000105055\n\n## Architecture\n\nThe library is split into one base and four supporting libraries.\nThe base library orchestrates the supporting libraries.\nAll compression algorithms follow the same basic structure:\n\n1. Decorrelate data using transformations\n2. Approximate the data, if lossy compression is needed\n3. Code the data\n\nAdditionally, check if each step executed as expected.\n\n```\n                   +----------------+      lossless      +----------+\n                   |                |                    |          |\nStart   +------\u003e   | Transformation |   +------------\u003e   |  Coding  |   +------\u003e   End\n                   |                |                    |          |\n                   +----------------+                    +----------+\n\n                           +                                   ^\n                           |                                   |\n                           |  lossy                            |\n                           |                                   |\n                           v                                   |\n                                                               |\n                   +---------------+                           |\n                   |               |                           |\n                   | Approximation |  +------------------------+\n                   |               |\n                   +---------------+\n```\nThis library will follow the same principles.\n\n### Transformations\nTransformations are algorithms which represent the same information using a different alphabet.\nGood transformation algorithms eliminate redundant information in the data.\nA mathematical function can be seen as a transformation of a series of data.\nThe series `1 1 2 3 5 8 13 21 ..` can expressed as `f(x) = f(x-1) + f(x-2)`.\nWe mapped the information represented in alphabet A (integers) to an alphabet B (letters + integers) which is more compact.\nIt is important to note that all transformations must have two properties:\n\n- Applying a transformation algorithm to data, does not loose information.\n- All transformation algorithms are reversible, such that the original representation can be reconstructed from the new alphabet.\n\n### Approximations\nApproximations are algorithms which loose information for the sake of better compression.\nGiven a threshold `theta` (this can be absolute or relative), the algorithm maps the data from alphabet A to B with an information lose within the expected threshold.\nAn example for an approximation is the `~=` operator known from primary school e.g. `1/3 ~= 0.3`.\nApproximations have the following properties:\n\n- Applying an approximation algorithm to data, results in information loss.\n- Approximation algorithms are not reversible.\n- The information loss is guaranteed to be within the threshold `theta`\n\n### Codings\nCodings are algorithms where the actual compression happens.\nThe information is being saved on disk as compact as possible.\nExamples are [Huffman](https://en.wikipedia.org/wiki/Huffman_coding) or\n[Arithmetic](https://en.wikipedia.org/wiki/Arithmetic_coding) coding.\n\n### Checksums\nChecksums are algorithms to check the integrity of the data at each step e.g. [Adler-32](https://en.wikipedia.org/wiki/Adler-32).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fucyo%2Frscompress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fucyo%2Frscompress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fucyo%2Frscompress/lists"}