#REFACTORING by stefan
class: CompressionStream
comment/format in: #zdeflate
changed: #flush
--- a/CompressionStream.st Mon Jan 27 12:19:45 2020 +0100
+++ b/CompressionStream.st Mon Jan 27 19:00:19 2020 +0100
@@ -285,9 +285,11 @@
zdeflate
"low level - deflate
- returns false if the deflate operation is finished otherwise true"
+ returns false if the deflate operation is finished, otherwise true"
^ self subclassResponsibility
+
+ "Modified (comment): / 27-01-2020 / 15:41:08 / Stefan Vogel"
!
zdeflateInit
@@ -735,19 +737,23 @@
|continue availOut|
- self isWritable ifFalse:[^ self].
+ self isWritable ifFalse:[
+ ^ self
+ ].
self zset_avail_in:position.
position := 0.
-
- [ continue := self zdeflate.
- availOut := self zget_avail_out.
+ [
+ continue := self zdeflate.
+ availOut := self zget_avail_out.
- availOut > 0 ifTrue:[
- self onStreamPutBytes:availOut from:outputBytes
- ].
+ availOut > 0 ifTrue:[
+ self onStreamPutBytes:availOut from:outputBytes
+ ].
+ continue
+ ] whileTrue.
- ] doWhile:[ continue == true ].
+ "Modified: / 27-01-2020 / 15:42:29 / Stefan Vogel"
!
nextPut:aByteOrCharacter