{"id":50425471,"url":"https://github.com/pmarreck/jp2z","last_synced_at":"2026-05-31T10:03:48.598Z","repository":{"id":359264222,"uuid":"1245168404","full_name":"pmarreck/jp2z","owner":"pmarreck","description":"Cleanroom JPEG 2000 (T.800) decoder in Zig with a C FFI","archived":false,"fork":false,"pushed_at":"2026-05-29T22:42:25.000Z","size":1368,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"yolo","last_synced_at":"2026-05-30T00:15:14.305Z","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":null,"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":null,"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":null,"dco":null,"cla":null}},"created_at":"2026-05-21T01:23:43.000Z","updated_at":"2026-05-29T22:42:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pmarreck/jp2z","commit_stats":null,"previous_names":["pmarreck/jp2z"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pmarreck/jp2z","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarreck%2Fjp2z","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarreck%2Fjp2z/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarreck%2Fjp2z/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarreck%2Fjp2z/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmarreck","download_url":"https://codeload.github.com/pmarreck/jp2z/tar.gz/refs/heads/yolo","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarreck%2Fjp2z/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:47.661Z","updated_at":"2026-05-31T10:03:48.594Z","avatar_url":"https://github.com/pmarreck.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jp2z\n\nCleanroom JPEG 2000 (T.800) decoder in pure Zig with a C FFI surface.\n\nSister project to [`jpegz`](https://github.com/pmarreck/jpegz) — same\narchitecture (Zig core + C FFI + C CLI dogfooding the boundary, Nix\nflake build, Garnix CI), focused exclusively on the wavelet-based\nJPEG 2000 codec family that has no shared algorithmic surface with\nT.81 baseline / extended / progressive / lossless / arithmetic JPEG\nor T.87 JPEG-LS.\n\n## Status\n\n**Phase 1 (now)**: thin wrapper over [openjpeg](https://github.com/uclouvain/openjpeg)\n(BSD-2). Decodes JP2 (file format) and J2K (raw codestream). Same\npattern jpegz used pre-cleanroom — gets users a working library\ntoday; the cleanroom retires the dependency milestone by milestone.\n\n**Phase 2 (multi-month)**: pure-Zig cleanroom replacement, planned\nin six sub-milestones (see `PLAN.md`):\n\n| Milestone | Scope |\n|-----------|-------|\n| M1 | Codestream marker walker + SIZ/COD/QCD parse |\n| M2 | Tier-2 (packet headers, layer/resolution/component/precinct) |\n| M3 | Tier-1 EBCOT decode (MQ coder + code-block decode) |\n| M4 | Inverse wavelet 5/3 (lossless) |\n| M5 | Inverse wavelet 9/7 (lossy) |\n| M6 | Multiple Component Transform (MCT) inverse |\n\nAt M6 jp2z is fully cleanroom; the openjpeg wrapper moves to\n`internal.*` as a build-time oracle for byte-perfect regression\ntesting (same pattern jpegz uses for libjpeg-turbo and charls today).\n\n## Architecture\n\n```\nAny consumer ──► C FFI boundary ──► Zig core (pure logic, no I/O)\n                                    │\n                                    ├── ffi/openjpeg_wrapper.zig (Phase 1)\n                                    └── decode/* (Phase 2 cleanroom, milestone by milestone)\n```\n\nMirrors jpegz's hexagonal layout. The C FFI is the real public\nAPI; even the bundled `jp2z` CLI (C, not Zig) calls through it to\ndogfood the boundary every test run.\n\n## Integration with jpegz\n\nOnce jp2z reaches M6 (cleanroom complete), jpegz's existing\n`pub const jpeg2000 = struct { ... }` namespace becomes a thin\nre-export shim:\n\n```zig\npub const jpeg2000 = struct {\n    const jp2z = @import(\"jp2z\");\n    pub const decode = jp2z.decode;\n    pub const decodeWithOptions = jp2z.decodeWithOptions;\n    pub const validate = jp2z.validate;\n};\n```\n\nAt that moment jpegz is 100% cleanroom at runtime — no asterisks.\njp2z stays consumable on its own for callers that only need T.800.\n\n## Patent posture\n\nJPEG 2000 Part 1 (T.800) core patents have all expired (filed\n~1995-2000, 20-year terms ended ~2015-2020). EBCOT (Taubman) was\npatented but licensed RF for the standard. Part 2 / JPX extensions\nhave murkier IP — **jp2z targets Part 1 only**.\n\n## Build\n\n```bash\n./build       # nix build, copies to zig-out/bin/jp2z\n./test        # full test suite (Zig unit + C CLI)\n./build_all   # native + cross for all 5 supported platforms\n```\n\n## License\n\nBSD-2 (same as openjpeg, for license compatibility during Phase 1).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmarreck%2Fjp2z","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmarreck%2Fjp2z","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmarreck%2Fjp2z/lists"}