
On Thursday 26 August 2010 09:33:30, Heinrich Apfelmus wrote:
Daniel Fischer wrote:
John Lato wrote:
Heinrich Apfelmus wrote:
Do you have an example where you want chunking instead of single character access?
I am unable to think of any examples where you want chunking for any reason other than efficiency.
For many hashing or de/encryption algorithms, chunking is more natural than single-character access.
Even when the chunk lengths are unpredictable? After all, unlike with fread in C, you can't request the next chunk to have a certain length with Iteratees.
Well, I just gave an example where one would want chunking for reasons other than performance. That iteratees don't provide the desired functionality is a different matter. For performance reasons, one would still be likely to want the I/O to happen in larger chunks than the processing, so it's kind of moot. Cheers, Daniel