Changes between Version 10 and Version 11 of ICryptoolStreamUsage


Ignore:
Timestamp:
Feb 12, 2011, 1:30:48 AM (11 years ago)
Author:
Matthäus Wander
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ICryptoolStreamUsage

    v10 v11  
    9595== Hints for implementing lazy readers ==
    9696
    97  * You may use CStreamReader.WaitEof() to wait until the writer has finished. After that, length will remain constant and you can expect CStreamReader.Length to remain constant.
     97 * You may use CStreamReader.WaitEof() to wait until the writer has closed the stream. When the method returns, the writer has finished and CStreamReader.Length will remain constant.
    9898 * If you don't like the property of CStreamReader.Read(byte[]), that it may return less bytes than requested, you can use CStreamReader.ReadFully(byte[]). Still, when you reach the end of a closed stream it will return less bytes.
    9999 * If you're superlazy, CStreamReader.ReadFully() will do all the stream reading and waiting work and deliver everything as a single byte[]. ReadFully() without parameters is terribly inefficient and you may become memory problems when processing large data amounts. Try to avoid it.