hGet package:streaming-bytestring

Read n bytes into a ByteStream, directly from the specified Handle.
Read entire handle contents lazily into a ByteStream. Chunks are read on demand, using the default chunk size. Note: the Handle should be placed in binary mode with hSetBinaryMode for hGetContents to work correctly.
Read entire handle contents lazily into a ByteStream. Chunks are read on demand, in at most k-sized chunks. It does not block waiting for a whole k-sized chunk, so if less than k bytes are available then they will be returned immediately as a smaller chunk. Note: the Handle should be placed in binary mode with hSetBinaryMode for hGetContentsN to work correctly.
Read n bytes into a ByteStream, directly from the specified Handle, in chunks of size k.
hGetNonBlocking is similar to hGet, except that it will never block waiting for data to become available, instead it returns only whatever data is available. If there is no data available to be read, hGetNonBlocking returns empty. Note: on Windows and with Haskell implementation other than GHC, this function does not work correctly; it behaves identically to hGet.
hGetNonBlockingN is similar to hGetContentsN, except that it will never block waiting for data to become available, instead it returns only whatever data is available. Chunks are read on demand, in k-sized chunks.