{"_id":"@azohra/meteo.j2k","_rev":"6-252acd02a1823de8f00564474c7bb3f4","name":"@azohra/meteo.j2k","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.1":{"name":"@azohra/meteo.j2k","version":"0.1.1","keywords":["jpeg2000","j2k","jp2","codestream","decoder","grib2"],"author":"Justin Watts","license":"MIT","_id":"@azohra/meteo.j2k@0.1.1","maintainers":[{"name":"azohra","email":"justin@azohra.com"}],"homepage":"https://meteo.azohra.com","dist":{"shasum":"de1193d0be2608c3310815bd3caeb54da1ffef86","tarball":"https://registry.npmjs.org/@azohra/meteo.j2k/-/meteo.j2k-0.1.1.tgz","fileCount":21,"integrity":"sha512-qir0sKcZNC3fRvAQSQfV+50zvBY5LsqHY/PULaaSSnyjBY66S9yWr5MGFCmDhJgiX3m9ZBuUoS0tQSrGuRBI6w==","signatures":[{"sig":"MEQCIHVfRoH9xvbd5j3lkNT5sSDdexuaq0vDkGvsOhWFEttAAiAklpGxSHg3QomBIFZpB1BCKoOXg3DPZUiMe7HGT8ahoQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66253},"type":"module","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vp test","build":"vp pack","typecheck":"pnpm run build && tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"azohra","email":"justin@azohra.com"},"repository":{"url":"git+https://github.com/azohra/meteo.git","type":"git","directory":"j2k"},"description":"The JPEG 2000 decoder of meteo by Azohra: a pure-TypeScript ITU-T T.800 implementation scoped to exactly the codestream subset ECCC's GRIB2 feeds ship - single tile, single grayscale component, reversible 5/3 wavelet, single quality layer, default precinc","directories":{},"_nodeVersion":"24.19.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.0","typescript":"^5.6.0","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/meteo.j2k_0.1.1_1786651170074_0.8297769755401405","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@azohra/meteo.j2k","version":"0.2.0","description":"A pure-TypeScript ITU-T T.800 JPEG 2000 decoder scoped to the codestream subset ECCC's GRIB2 feeds ship: single tile, single grayscale component, reversible 5/3 wavelet, single quality layer, default precincts, MQ-coded EBCOT. Anything outside that subset","keywords":["jpeg2000","j2k","jp2","codestream","decoder","grib2"],"author":"Justin Watts","license":"MIT","repository":{"type":"git","url":"git+https://github.com/azohra/meteo.git","directory":"j2k"},"type":"module","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"devDependencies":{"@types/node":"^22.10.0","typescript":"^5.6.0","vitest":"^4.0.0"},"engines":{"node":">=22"},"homepage":"https://meteo.azohra.com","scripts":{"build":"vp pack","test":"vp test","typecheck":"pnpm run build && tsc -p tsconfig.json --noEmit"},"_nodeVersion":"24.19.0","_id":"@azohra/meteo.j2k@0.2.0","dist":{"integrity":"sha512-iaQ22wPRgri5/VdZrHfSvEwRveznWozKHq8Ts7cy/zzkWZr9AMbhIeI8OlHKZtsaZV3F2VJlgP6zXj95b+nQog==","shasum":"459bb632c1681ff6671c55a323381ab8582d3839","tarball":"https://registry.npmjs.org/@azohra/meteo.j2k/-/meteo.j2k-0.2.0.tgz","fileCount":21,"unpackedSize":67202,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHrnsgbP6s2iM2K8n+8rRTV5bgoFp72gzSQNtLCk+7lTAiEA/wPNAa2QpbaDh0EVgzZB7mDV6hdkDu2X0RMn98MjqEM="}]},"_npmUser":{"name":"azohra","email":"justin@azohra.com"},"directories":{},"maintainers":[{"name":"azohra","email":"justin@azohra.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/meteo.j2k_0.2.0_1787250943085_0.07243680473818759"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-13T08:03:19.532Z","modified":"2026-08-20T18:35:43.431Z","0.1.0":"2026-08-13T08:03:19.934Z","0.1.1-preview.1":"2026-08-13T19:45:55.561Z","0.1.1":"2026-08-13T19:59:30.239Z","0.2.0":"2026-08-20T18:35:43.259Z"},"author":"Justin Watts","license":"MIT","homepage":"https://meteo.azohra.com","keywords":["jpeg2000","j2k","jp2","codestream","decoder","grib2"],"repository":{"type":"git","url":"git+https://github.com/azohra/meteo.git","directory":"j2k"},"description":"A pure-TypeScript ITU-T T.800 JPEG 2000 decoder scoped to the codestream subset ECCC's GRIB2 feeds ship: single tile, single grayscale component, reversible 5/3 wavelet, single quality layer, default precincts, MQ-coded EBCOT. Anything outside that subset","maintainers":[{"name":"azohra","email":"justin@azohra.com"}],"readme":"# `@azohra/meteo.j2k`\n\nA JPEG 2000 (ITU-T T.800) decoder in pure TypeScript, scoped to exactly\nthe codestream subset ECCC's GRIB2 feeds ship, justified by\nexplainability: every marker, MQ context, and lifting step lives in ten\nsmall modules with its clause of T.800 named. It is the production\ncodec behind `@azohra/meteo.grib/j2k-node`, and owning the\ninternals pays twice: `decodeJ2kRegion` decodes *only* the codeblocks a\nfew requested gridpoints touch (bit-identical to the full decode at\nthose points, ~16× faster per core on the largest ECCC field), and the\nworker pool fans one field's independent EBCOT codeblocks across threads\nfor full decodes. Benchmarks, with dates and method:\n<https://meteo.azohra.com/docs/j2k/performance/>.\nZero runtime dependencies, no Node APIs in `src/`.\n\n```sh\npnpm add @azohra/meteo.j2k\n```\n\n## Decode a real field\n\nThe workspace's golden corpus carries real ECCC messages; the codestream\nis the GRIB section 7 payload (DRT 5.40). This decodes one and reads a\nsample:\n\n```js\n// decode-fixture.mjs — run inside j2k/ after `pnpm build` (and a grib build)\nimport { readFileSync } from \"node:fs\";\nimport { parseFields, splitMessages } from \"../grib/dist/index.js\";\nimport { decodeJ2k } from \"./dist/index.js\";\n\nconst bytes = readFileSync(\"../grib/test/fixtures/geps-orog-m00.grib2\");\nconst [field] = parseFields(splitMessages(bytes)[0]);\nconst codestream = field.section7.subarray(5); // DRT 5.40: raw J2K after the section header\n\nconst { values, width, height, bitsPerSample, isSigned } = decodeJ2k(codestream);\nconsole.log(`${width}x${height} = ${values.length} samples, ${bitsPerSample}-bit ${isSigned ? \"signed\" : \"unsigned\"}`);\nconsole.log(`first samples: ${Array.from(values.slice(0, 4)).join(\", \")}`);\n```\n\n```text\n720x361 = 259920 samples, 12-bit unsigned\nfirst samples: 1166, 1166, 1166, 1166\n```\n\nWhen only a few gridpoints matter, `decodeJ2kRegion(codestream, indices)`\nreturns the same integers `decodeJ2k` would put at those raster indexes\nwhile entropy-decoding only the codeblocks the points touch.\n\nThe decoder covers the measured subset the feeds ship and nothing more\n(everything outside it fails loudly with a named `UnsupportedJ2kError`);\nhow every configuration is accepted — including region decode's exactness\ncontract — is at <https://meteo.azohra.com/docs/j2k/correctness/>.\n\n## Documentation\n\nThe reference lives in [`docs/`](docs/) (the subset, the two-ring\ncorrectness gate, and the measured performance each have a page) and is\nserved at <https://meteo.azohra.com/docs/j2k/>.\n\nMIT © Justin Watts\n","readmeFilename":""}