Bug 690628

Summary: don't throw for incomplete Deflate streams
Product: MuPDF Reporter: zeniko
Component: fitzAssignee: Tor Andersson <tor.andersson>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P4    
Version: unspecified   
Hardware: All   
OS: All   
URL: http://code.google.com/p/sumatrapdf/issues/detail?id=514
Customer: Word Size: ---

Description zeniko 2009-07-13 14:23:26 UTC
The document linked from the URL apparently contains an incomplete Deflate stream. 
Nonetheless, the document displays exactly as in Adobe Reader, if we don't throw 
by requesting more input but instead be done with it as in 
http://code.google.com/p/sumatrapdf/source/detail?r=1302 (this might still throw 
later on, if the stream indeed was too incomplete).
Comment 1 zeniko 2009-07-13 17:47:03 UTC
Turns out that this issue is also solved by calling inflate with flush=Z_FINISH at 
the end of the stream (which per zlib's documentation is even required): http://code.google.com/p/sumatrapdf/source/detail?r=1304