[Haskell-cafe] ANNOUNCE: enumerator 0.4.8

John A. De Goes john at n-brain.net
Mon Mar 28 19:16:23 CEST 2011

This isn't quite what I'm after. I want to pull chunks on demand (i.e. have control over both the input and the output). Enumeratees don't allow me to do that.


John A. De Goes
Twitter: @jdegoes 
LinkedIn: http://linkedin.com/in/jdegoes

On Mar 27, 2011, at 7:58 PM, John Millikin wrote:

> If the receiver can only accept very small chunks, you can put a rechunking stage in between the compression and iteratee:
> -----------------------------------------------------------
> verySmallChunks :: Monad m => Enumeratee ByteString ByteString m b
> verySmallSchunks = sequence (take 10)
> -----------------------------------------------------------
> Resending is slightly more complex -- if the other end can say "resend that last chunk", then it should be easy enough, but "resend the last 2 bytes of that chunk you sent 5 minutes ago" would be much harder. What is your use case?

More information about the Haskell-Cafe mailing list