15 Feb
2001
15 Feb
'01
4:50 p.m.
| So what's going on? How can the goal be achieved? I don't know, but here's a different suggestion, using bzip2 (you could do the same with zlib for .gz files): use the foreign import mechanism to make BZ2_bzopen, BZ2_bzwrite and BZ2_bzclose available in your program. Then: do bz2 <- bzopen "output.bz2" "w" let chars_to_write = ... :: String bzwrite bz2 (packString chars_to_write) (length chars_to_write) -- the above as many times as you like bzclose bz2 and link your program with libbz2.a or libbz2.so. Almost the same trick works with the zlib library for directly reading/writing .gz files. This strikes me as far more convenient than messing round with pipes, etc. J