{"id":50425475,"url":"https://github.com/pmarreck/jpegz","last_synced_at":"2026-05-31T10:03:49.868Z","repository":{"id":355857820,"uuid":"1229246710","full_name":"pmarreck/jpegz","owner":"pmarreck","description":"Spec-complete JPEG family decoder library in Zig (baseline / progressive / lossless / arithmetic / JPEG-LS / JPEG 2000)","archived":false,"fork":false,"pushed_at":"2026-05-22T15:50:50.000Z","size":1029,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"yolo","last_synced_at":"2026-05-22T18:57:14.170Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Zig","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/pmarreck.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-04T21:10:56.000Z","updated_at":"2026-05-22T15:50:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pmarreck/jpegz","commit_stats":null,"previous_names":["pmarreck/jpegz"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pmarreck/jpegz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarreck%2Fjpegz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarreck%2Fjpegz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarreck%2Fjpegz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarreck%2Fjpegz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmarreck","download_url":"https://codeload.github.com/pmarreck/jpegz/tar.gz/refs/heads/yolo","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarreck%2Fjpegz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33726722,"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-05-31T02:00:06.040Z","response_time":95,"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":"2026-05-31T10:03:48.820Z","updated_at":"2026-05-31T10:03:49.863Z","avatar_url":"https://github.com/pmarreck.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jpegz\n\n[![Garnix](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgarnix.io%2Fapi%2Fbadges%2Fpmarreck%2Fjpegz%3Fbranch%3Dyolo)](https://garnix.io/repo/pmarreck/jpegz)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\nSpec-complete JPEG family decoder library in Zig. One project, one ABI surface,\ncovering:\n\n- **Baseline JPEG** (ISO/IEC 10918-1, T.81) — DCT, sequential\n- **Progressive JPEG** (ISO/IEC 10918-1)\n- **Lossless JPEG** (ISO/IEC 10918-1, T.81 §13) — used by DICOM, some early DNG\n- **Arithmetic coding** (ISO/IEC 10918-1, T.81 §F)\n- **JPEG-LS** (ISO/IEC 14495-1, T.87) — eventually\n- **JPEG 2000** (ISO/IEC 15444, T.800) — wavelet codec, separate ABI namespace\n  in the same project (different math, but same problem domain)\n\nThis is a sibling project to [`validate`](../validate),\n[`tiffz`](../tiffz), [`bzip2z`](../bzip2z), [`rarz`](../rarz),\n[`par2z`](../par2z), [`uchardetz`](../uchardetz), and\n[`zstdz`](../zstdz).\n\n## Why jpegz exists\n\n`validate` has been carrying three things:\n- A C-FFI dep on `libjpeg-turbo` (BSD-3) for baseline + progressive\n- A pure-Zig 698-line lossless JPEG decoder (`jpeg_lossless_decoder.zig`)\n- A C-FFI dep on `openjpeg` (BSD-2) for JPEG 2000\n\n`tiffz` (greenfield) needs JPEG-in-TIFF (compression=7). Both projects need\na unified, focused JPEG home.\n\n## Architecture\n\n```\nAny consumer (validate / tiffz / image tools) ──► C FFI ──► jpegz Zig core\n```\n\nThe Zig core is the single source of truth. The C FFI is the public API.\nExternal consumers — including any C CLI on top — go through the C FFI.\n\n## Phasing\n\n**Phase 1 (MVP, libjpeg-turbo wrapper).** Wrap `libjpeg-turbo` for baseline +\nprogressive. Lift validate's `jpeg_lossless_decoder.zig` directly. Add an\n`openjpeg` wrapper for JPEG 2000. One unified Zig API + C ABI; the\nimplementation is mostly FFI-into-C-libs in this phase. Both validate and\ntiffz can depend on jpegz the day it's stood up.\n\n**Phase 2 (cleanroom replacement).** Rewrite each codec in pure Zig,\nkeeping the C deps as test oracles only. Final state: zero C deps;\nlibjpeg-turbo and openjpeg ship only in `tests/` for sanity-check\nassertions. See `SPEC.md` §6 for the order (baseline first, then\nprogressive, then lossless rewrite, then arithmetic, then JPEG-LS, then\nJPEG 2000 wavelet pipeline).\n\n## Goals\n\n1. **Spec-complete.** Every variant the published JPEG specs define,\n   including arithmetic coding (rare but spec-mandatory), 12-bit\n   precision, multi-component subsampling, and the lossless mode.\n2. **JPEG 2000 in the same project.** Shares packaging, build, ABI\n   conventions; separate ABI namespace because the codec internals are\n   completely different (wavelet, EBCOT, T2/T1 packets).\n3. **No I/O in the core.** Pure Zig core operates on `[]const u8`\n   buffers and `std.io.Reader`-shaped interfaces.\n4. **Hexagonal architecture.** Zig core + C FFI + (optional) C CLI, per\n   project convention.\n5. **Cleanroom replacement targeted by Phase 2.** Until then, libjpeg-\n   turbo / openjpeg do the heavy lifting and are honest about it (see\n   `LICENSING_NOTES.md`).\n\n## Status\n\n🚧 **Greenfield.** No code yet beyond this scaffold. See `SPEC.md`.\n\n## License\n\nMIT (see `LICENSE`). Phase 1 transitively pulls in libjpeg-turbo (BSD-3)\nand openjpeg (BSD-2) — both MIT-compatible. Phase 2 retires those deps.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmarreck%2Fjpegz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmarreck%2Fjpegz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmarreck%2Fjpegz/lists"}