Files over a certain size (close to 1mb?) cannot be decoded with a reasonable number of chunks, and we're not even trying to decode streams with more than ~3k chunks (to keep the bitset for counting chunks to a reasonable size).
This means that the receiver appears to be broken when scanning qr codes with lots of chunks -- we should prevent the transmitter from generating such streams, and notify the receiver that there are too many chunks to read.
We need to do both because it's possible that the transmitter may be using a chunk limit based on memory that could be higher than the chunk limit on the receiver.
Files over a certain size (close to 1mb?) cannot be decoded with a reasonable number of chunks, and we're not even trying to decode streams with more than ~3k chunks (to keep the bitset for counting chunks to a reasonable size).
This means that the receiver appears to be broken when scanning qr codes with lots of chunks -- we should prevent the transmitter from generating such streams, and notify the receiver that there are too many chunks to read.
We need to do both because it's possible that the transmitter may be using a chunk limit based on memory that could be higher than the chunk limit on the receiver.