module HaskellWorks.Data.Simd.ChunkString
  ( ChunkString
  , ToChunkString(..)
  , hGetContents
  ) where

import HaskellWorks.Data.Simd.Internal.ChunkString

import qualified HaskellWorks.Data.ByteString as BS
import qualified System.IO                    as IO

hGetContents :: IO.Handle -> IO ChunkString
hGetContents :: Handle -> IO ChunkString
hGetContents = ([ByteString] -> ChunkString
ChunkString ([ByteString] -> ChunkString) -> IO [ByteString] -> IO ChunkString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>) (IO [ByteString] -> IO ChunkString)
-> (Handle -> IO [ByteString]) -> Handle -> IO ChunkString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Handle -> IO [ByteString]
BS.hGetContentsChunkedBy Int
chunkSize
{-# INLINE hGetContents #-}