{"id":20289360,"url":"https://github.com/apt1002/fvq","last_synced_at":"2026-04-22T03:32:07.939Z","repository":{"id":207099043,"uuid":"718384559","full_name":"apt1002/fvq","owner":"apt1002","description":"Fractal Vector Quantizer: version 34 of my image compression experiment.","archived":false,"fork":false,"pushed_at":"2023-12-24T03:53:52.000Z","size":4961,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-04T04:41:42.541Z","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":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apt1002.png","metadata":{"files":{"readme":"README.md","changelog":null,"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-11-14T00:51:47.000Z","updated_at":"2023-11-14T03:50:05.000Z","dependencies_parsed_at":"2023-11-30T03:30:43.799Z","dependency_job_id":"c9bc71af-1037-48f4-849d-b951cba8b8be","html_url":"https://github.com/apt1002/fvq","commit_stats":null,"previous_names":["apt1002/fvq"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/apt1002/fvq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apt1002%2Ffvq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apt1002%2Ffvq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apt1002%2Ffvq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apt1002%2Ffvq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apt1002","download_url":"https://codeload.github.com/apt1002/fvq/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apt1002%2Ffvq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32119775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T00:31:26.853Z","status":"online","status_checked_at":"2026-04-22T02:00:05.693Z","response_time":58,"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":"2024-11-14T14:53:15.938Z","updated_at":"2026-04-22T03:32:07.924Z","avatar_url":"https://github.com/apt1002.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fractal Vector Quantizer: version 34 of my image compression experiment.\n\nMy goal is to invent a lossy image compression algorithm for natural images\n(i.e. photographs). This is the latest in a series of experiments with which I\nam gradually developing the technology. If successful, I will define the FVQ\nfile format for storing compressed images, and I will deliver a tool for\nconverting images to and from FVQ format.\n\n## Competitive position\n\nMany good lossy image compression formats already exist. [JPEG] remains the\nmost popular, though there are now some established formats that compress\nbetter, such as [WebP] and [AVIF]. Mine competes as follows:\n\n - Smaller compressed files. I'm aiming for 0.3 bits per pixel or better: half\nthe file size of a JPEG.\n\n - Designed for noisy images. Since about 2010, the quality of photographs has\nbeen limited by noise, not by resolution. There is a gap in the market for a\nformat with low image quality and small files, suitable for storing high\nresolution images.\n\n - Computationally cheap, especially for decompression. It is more expensive\nthan JPEG, but not much.\n\n - Easy to implement.\n\n## Interesting features\n\nI have developed a good wavelet transform. It has the following properties:\n\n - Exactly orthonormal - It does not distort the noise ellipsoid.\n\n - Exactly invertible - No loss of information (besides rounding errors).\n\n - Smooth - The [mother wavelet] has four zero moments, meaning that an image\nthat is a bicubic function or simpler has a high-frequency component of zero.\n\n - Reasonably cheap to compute.\n\nI have developed a perceptual model that replaces [gamma correction]. This is\nneeded to avoid applying the wavelet transform to gamma-corrected data. JPEG\nand some other image compression algorithms *do* apply linear transforms to\ngamma-corrected data, which results in unsightly artifacts.\n\nI use [lattice quantization] for the larger wavelet coefficients. The\ncoefficients naturally come in triplets, which I quantise using the\nbody-centred cubic lattice (a.k.a. A3* and D3*).\n\nI (will) use [vector quantization] for the smaller wavelet coefficients.\n\nMore to come!\n\n## Status\n\nThis is a work in progress (#3). Some parts of the algorithm are working, and others\nare not yet written. I have not yet reached the point where I can generate a\ncompressed image file.\n\nEven after that point, the specification of an FVQ file will likely change as I\noptimise and simplify the algorithm. This software should therefore not be used\nfor storing valuable data at the moment.\n\nIf the file format proves useful, it will be desirable to optimise the\nsoftware. That would be a nice problem to have.\n\n## Usage\n\nThe software is written in [Rust] and built using [cargo].\n\n```\n$ git clone git@github.com:apt1002/fvq.git\n$ cd fvq\n$ cargo run --bin [...]\n```\n\n[JPEG]: https://en.wikipedia.org/wiki/JPEG\n[WebP]: https://en.wikipedia.org/wiki/WebP\n[AVIF]: https://en.wikipedia.org/wiki/AVIF\n[mother wavelet]: https://en.wikipedia.org/wiki/Wavelet#Mother_wavelet\n[gamma correction]: https://en.wikipedia.org/wiki/Gamma_correction\n[lattice quantization]: https://publications.lib.chalmers.se/records/fulltext/23008/23008.pdf\n[body-centred cubic lattice]: https://www.physics-in-a-nutshell.com/article/12/body-centered-cubic-bcc\n[vector quantization]: https://en.wikipedia.org/wiki/Vector_quantization\n[Rust]: https://www.rust-lang.org/\n[cargo]: https://doc.rust-lang.org/cargo/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapt1002%2Ffvq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapt1002%2Ffvq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapt1002%2Ffvq/lists"}