#REFACTORING by cg
authorClaus Gittinger <cg@exept.de>
Fri, 13 Jan 2017 13:03:41 +0100
changeset 4258 e74b86a138c2
parent 4250 c21944d9e5d7
child 4259 78c1a6dc76d4
#REFACTORING by cg class: CompressionStream class definition added: #setInputStream: comment/format in: #documentation
CompressionStream.st
--- 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