Skip to content

Conversation

@telecos
Copy link
Contributor

@telecos telecos commented Jan 27, 2026

This PR extends the coarse-grained resumable decoding from #2738 and its further extension to support resumable row decoding from #2744 to also support resuming during metadata parsing. Mainly 3 different stages are defined (headers parsing, palette and icc profile), so that if UnexpectedEof occurs during their parsing, the decoder can now be resumed from the last recoverable point from metadata rather than restarting from the beginning.

This PR should complete #2696 (considering that by now resuming RLE decompression is not resumable and each retry will require to be resumed from the beginning of image data)

@telecos telecos marked this pull request as ready for review January 27, 2026 15:40
@telecos telecos requested a review from anforowicz January 27, 2026 22:59
Copy link
Member

@197g 197g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @anforowicz for already doing a lot of that review. Manual state machines are hard to write and review, I'm not entirely sure I caught everything but there was some change in behavior. Maybe future Rust will give us better tools.

@telecos telecos requested review from 197g and anforowicz January 28, 2026 19:34
@197g 197g merged commit 3dcf1a0 into image-rs:main Jan 28, 2026
32 checks passed
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.

3 participants