-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Although encoders and decoders should treat the length as unsigned, its value shall not exceed 231-1 bytes.
-- the PNG spec (Second Edition)
- An oversized inflated
IDAT(orfdAT- but this would require renumbering all the APNG chunks, which is the same problem as merging adjacentfdATs) can be split;- this could mean that chunk inflating is no longer always a one-to-one transformation
- this could mean that
Chunkstruct could hold data that is illegal to write - which can already happen through theConcatinateIdatsstep, or theoretically sinceChunkdoesn't currently encapsulate itstypfield. Being idiomatic would probably require forcingChunkto always be a valid-to-write chunk. (have separate png-legal Chunk and a not-neccessarily-legal Chunk types? seems overengineered). And this would require adding aSplitIdatsstep.
- An oversized inflated
zTXT,iCCPoriTXTwould be unrecoverable. Those chunks can't be split with a preserved meaning, and an algorithm to inflate as much as possible without going over 2MB is not worth the time or effort. - any other chunk wasn't decompressed, and thus was an input error to begin with, but could be checked at read time
Also, might want to be able to integration-test this without having to commit a 2MB file into the source repository. Which would mean having to let the derive crate generate files in addition to listing existing paths.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working