image-rs / image-gif

GIF en- and decoder
Apache License 2.0
150 stars 40 forks source link

Option to skip decoding, while keeping LZW-compressed data #155

Closed kornelski closed 11 months ago

kornelski commented 1 year ago

Builds on top of #153 and #144. Implements https://github.com/image-rs/image-gif/pull/144#issuecomment-1492163801

This is a minimal implementation that keeps the current layering between decode_next and LZW decoding happening within.

I've also explored an alternative approach where decode_next only returned compressed Decoded::LzwData, leaving LZW decoding to an upper layer like fill_buffer. That seemed like a more elegant, layered design, but it meant that the lower-level decode_next part of the decoder would always consume full blocks of LZW data, before validity or end of LZW data were checked. It also made fill_buffer have to deal with excess LZW data to decode.

kornelski commented 11 months ago

@HeroicKatora @fintelia Reminder about the PRs.

If you don't have the time to maintain the gif crate, can you add me as a maintainer? I'm probably the biggest user of this crate, given that I use it at Cloudflare and in gifski.

fintelia commented 11 months ago

@kornelski I just sent you an invite granting you permissions to review/merge pull requests across the image-rs org.

If anyone else reading this is interesting in being a reviewer, please see: https://github.com/image-rs/organization/issues/15