Rechunk a conduit into larger chunks using combinators
I am trying to construct a Conduit that receives as input ByteString s (of around 1kb per chunk in size) and produces as output concatenated ByteString s of 512kb chunks. This seems like it should be simple to do, but I'm having a lot of trouble, most of the strategies I've tried using have only succeeded in dividing the chunks into smaller chunks, I haven't succeeded in concatenating larger chunks. I started out trying isolate , then takeExactlyE and eventually conduitVector , but to no avail. Eventually I settled on this: import qualified Data.Conduit as C import qualified Data.Conduit