Results 204 comments of David Buchanan

I'm actually having a bit of trouble reproducing it myself now 😅 While memory usage does increase by ~1GB every time I invoke the client script, it eventually drops back...

Note that Apple's variant is patented: https://patents.google.com/patent/US20080177769 Also IIUC any official documentation, if it exists, is under NDA.

I personally consider it not-cheating because: a) The CPython team have been aware of the "bug" for many years, and have expressed no intent to patch it afaict. Therefore it...

Proof-of-concept: ```python import zlib def decompress_headerless(data): d = zlib.decompressobj(wbits=-15) result = d.decompress(data) result += d.flush() # do all the checks we can? assert(len(d.unconsumed_tail) == 0) assert(len(d.unused_data) == 0) return result...

I did all the checks I could, I'm not quite sure how to make zlib complain about incomplete data when decompressing piece `a`

I realised that apple made this same mistake in their own parallel-decodable PNG implementation: https://www.da.vidbuchanan.co.uk/widgets/pngdiff/

And yes, this is a 100% solvable problem - but clearly even Apple didn't get it right, so it's something that needs to be approached with care.

Aha, thanks, that's what I was looking for!

See https://datatracker.ietf.org/doc/html/rfc1951

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....