diff --git a/machines-io.cabal b/machines-io.cabal
--- a/machines-io.cabal
+++ b/machines-io.cabal
@@ -1,5 +1,5 @@
 name:                machines-io
-version:             0.2.0.6
+version:             0.2.0.8
 synopsis:            IO utilities for the machines library
 homepage:            http://github.com/aloiscochard/machines-io
 license:             Apache-2.0
diff --git a/src/System/IO/Machine.hs b/src/System/IO/Machine.hs
--- a/src/System/IO/Machine.hs
+++ b/src/System/IO/Machine.hs
@@ -1,9 +1,12 @@
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE Rank2Types #-}
 module System.IO.Machine where
 
+#if !MIN_VERSION_base(4,8,0)
 import Control.Applicative ((<$>))
+#endif
 import Control.Monad.IO.Class (MonadIO, liftIO)
-import Data.IOData (IOData, hGetLine, hPutStrLn)
+import Data.IOData (IOData, hGetChunk, hGetLine, hPut, hPutStrLn)
 import Data.Machine
 import Data.Word (Word8)
 import System.IO (Handle, hIsEOF)
@@ -22,6 +25,12 @@
 byChar :: IODataMode Char
 byChar = (\h -> BSC8.head <$> BSC8.hGet h 1, \h w -> BSC8.hPut h $ BSC8.pack [w])
 
+byChunk ::  IOData a => IODataMode a
+byChunk = (\h -> hGetChunk h, \h xs -> hPut h xs)
+
+byChunkOf :: Int -> IODataMode BS.ByteString
+byChunkOf n = (\h -> BS.hGet h n, \h xs -> BS.hPut h xs)
+
 byWord8 :: IODataMode Word8
 byWord8 = (\h -> BS.head <$> BS.hGet h 1, \h w -> BS.hPut h $ BS.pack [w])
 
@@ -50,10 +59,10 @@
 sinkIO :: (a -> IO ()) -> SinkIO m a
 sinkIO f = repeatedly $ await >>= liftIO . f
 
-sinkHandle :: IOData a => IODataMode a -> Handle -> SinkIO m a
+sinkHandle :: IODataMode a -> Handle -> SinkIO m a
 sinkHandle (_, w) h = repeatedly $ await >>= liftIO . w h
 
-sinkHandleWith :: IOData a => (Handle -> a -> IO ()) -> Handle -> SinkIO m a
+sinkHandleWith :: (Handle -> a -> IO ()) -> Handle -> SinkIO m a
 sinkHandleWith f h = repeatedly $ await >>= liftIO . f h
 
 filteredIO :: (a -> IO Bool) -> ProcessT IO a a
