On Thu, 24 Feb 2011 13:45:59 -0700, Andrew Coppin <andrewcop...@btinternet.com> 
wrote:

The input list is being read from disk by lazy I/O. With the original 
implementation, the input file gets read at the same time as the output file is 
written. But runST returns nothing until the *entire* input has been 
compressed. So writing to disk doesn't start until the entire file has been 
slurped up into memory.
Anybody have any hints on how to get around this?


I'd recommend using an enumerator/iterator package to read and process the file 
as a stream of chunks.  The assumption here is that you don't need the entire 
input to provide enough state to begin generating output.

--
-KQ

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to