Hi, Im starting in haskell, and wish to develop a program to process hd images, searching for file specific patterns. I will have to deal with situations where I only want to read the end of the image. My problem is: if I use hGetContents to that, the beginning of the file will allways be readen, even if only the end is important. Is there any way to tell the compiller to be 'more lazy' so if appears content!!100000 it skips a lot of data? Im not concearned with concurrency here. Átila
Hello Atila, Thursday, February 16, 2006, 8:03:29 PM, you wrote: AR> Is there any way to tell the compiller to be 'more lazy' so if appears AR> content!!100000 it skips a lot of data? AR> Im not concearned with concurrency here. FastPackedStrings library with its mmap support will help you -- Best regards, Bulat mailto:bulatz@HotPOP.com
Hi,
I will have to deal with situations where I only want to read the end of the image.
Try: hOpen, hSeek, then probably hGetBuf http://haskell.org/ghc/docs/latest/html/libraries/base/System-IO.html#t%3ASe... Thanks Neil
participants (3)
-
Atila Romero -
Bulat Ziganshin -
Neil Mitchell