DavidBuchanan314 / parallel-png-proposal

MIT License
80 stars 0 forks source link

Handling of unknown flags #1

Open syvb opened 2 years ago

syvb commented 2 years ago

The proposal doesn't say how implementations should handle unrecognized bits in the flags that are currently reserved. Should they ignore an entire pLLd chunk if it has unrecognized flags, or just ignore the unrecognized flags? The implementation decoder.py seems to suggest the former.

DavidBuchanan314 commented 2 years ago

Good question. It comes down to whether any new flags represent "nice to know" vs "need to know" information - and we can't really know in advance which they'll be.

The safe option is certainly for a decoder to fall back to non-parallel decoding, if it sees an unrecognised flag.

DavidBuchanan314 commented 2 years ago

Idea:

Declare zeroed flags to be safe to ignore, while set flags cannot be ignored.

If I follow through on this, I'd have to invert the current meaning of bit 0.