Skip to content

fix: Decode partial htj2k stream#68

Open
wayfarer3130 wants to merge 1 commit into
mainfrom
fix/htj2k-partial
Open

fix: Decode partial htj2k stream#68
wayfarer3130 wants to merge 1 commit into
mainfrom
fix/htj2k-partial

Conversation

@wayfarer3130
Copy link
Copy Markdown
Contributor

The previous version of the htj2k decoder could decode a partial htj2k stream IF it knew the exact full length beforehand. This change allows just giving the htj2k a partial input and allowing it to decode. Most of hte changes are in cornerstonejs/OpenJPH#3

Also added new tests for this and change the decoder to work repeatedly rather than getting slower and slower.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 21, 2026

Merging this PR will not alter performance

⚡ 1 improved benchmark
❌ 3 regressed benchmarks
✅ 11 untouched benchmarks
⏩ 35 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
encode CT1.RAW (HTJ2K lossless) — cold 36.7 ms 34.7 ms +5.73%
decode CT1.j2c (.201 lossless, 512x512x16bit) — warm 36.8 ms 40.2 ms -8.51%
decode CT2.j2c (.201 lossless, 512x512x16bit) — cold 36.6 ms 39.1 ms -6.57%
decode CT2.j2c (.201 lossless, 512x512x16bit) — warm 36.6 ms 39.1 ms -6.58%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing fix/htj2k-partial (ff08a16) with main (04c3e87)

Open in CodSpeed

Footnotes

  1. 35 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant