#REFACTORING by cg
class: CompressionStream
class definition
added: #setInputStream:
comment/format in: #documentation
--- a/CompressionStream.st Wed Jan 11 15:29:05 2017 +0100
+++ b/CompressionStream.st Fri Jan 13 13:03:41 2017 +0100
@@ -18,7 +18,7 @@
outputBytes zstream suppressHeaderAndChecksum propagateClose'
classVariableNames:'BlockSize'
poolDictionaries:''
- category:'System-Compress'
+ category:'Streams-Compressed'
!
!CompressionStream class methodsFor:'documentation'!
@@ -39,7 +39,7 @@
documentation
"
- Abstract superclass of streams that compress or deconpress data
+ Abstract superclass of streams that compress or decompress data
[author:]
Claus Atzkern
@@ -637,6 +637,17 @@
suppressHeaderAndChecksum:aBoolean
!
+setInputStream:aStream
+ "change the input stream (i.e. continue reading from aStream).
+ Useful if the input arrives in chunks, and we have to continue decompressing
+ from the next chunk (passing a readStream on the next chunk here)."
+
+ mode ~~ #readonly ifTrue:[
+ self errorWriteOnly
+ ].
+ onStream := aStream.
+!
+
streamOpenWithMode:aMode on:aStream
^ self