I enjoy learning about new abstractions, but have some trouble fitting 
pipes, lenses and free monad transformers together. Consider a somewhat 
contrieved sccenario, extracting data from a curious archive format. First 
there's an integer, then four blocks of 10 MB data each, then another 
integer with four new blocks of data, etc. After reading an integer n I 
would like to write each data block to files with names n, n+1, n+2, and 
n+3 (possibly with a .dat extension) without reading everything into memory 
at once, and then go on with the next integer and blocks, etc. until end of 
file. I imagine this involves Pipes.ByteString.chunksOf (10*1024*1024), but 
should I then write a FreeT joiner that streams to 
Pipes.ByteString.toHandle, or can the existing grouping utilities be used?

-- 
You received this message because you are subscribed to the Google Groups 
"Haskell Pipes" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].

Reply via email to