'From Squeak3.1alpha of 28 February 2001 [latest update: #3966] on 2 May 2001 at 6:14:55 pm'! "Change Set: ZipFix-ar Date: 2 May 2001 Author: Andreas Raab Fixes a problem when a (valid) empty data block was encountered in the input stream while preserving primitive failure if nothing has been decoded at all."! !InflateStream methodsFor: 'private' stamp: 'ar 5/2/2001 18:11'! pastEndRead "A client has attempted to read beyond the read limit. Check in what state we currently are and perform the appropriate action" | blockType bp | state = StateNoMoreData ifTrue:[^nil]. "Get out early if possible" "Check if we can move decoded data to front" self moveContentsToFront. "Check if we can fetch more source data" self moveSourceToFront. state = StateNewBlock ifTrue:[state _ self getNextBlock]. blockType _ state bitShift: -1. bp _ self bitPosition. self perform: (BlockTypes at: blockType+1). "Note: if bit position hasn't advanced then nothing has been decoded." bp = self bitPosition ifTrue:[^self primitiveFailed]. ^self next! ! InflateStream removeSelector: #nextCalledByPastEndRead!