module Data.Conduit.Blaze
(
builderToByteString
, unsafeBuilderToByteString
, builderToByteStringWith
, builderToByteStringFlush
, builderToByteStringWithFlush
, B.Buffer
, B.freeSize
, B.sliceSize
, B.bufferSize
, B.allocBuffer
, B.reuseBuffer
, B.nextSlice
, B.unsafeFreezeBuffer
, B.unsafeFreezeNonEmptyBuffer
, B.BufferAllocStrategy
, B.allNewBuffersStrategy
, B.reuseBufferStrategy
) where
import Data.Conduit
import qualified Data.ByteString as S
import Blaze.ByteString.Builder (Builder)
import Control.Monad.Primitive (PrimMonad)
import Control.Monad.Base (MonadBase)
import Data.Streaming.Blaze
import qualified Data.Conduit.ByteString.Builder as B
builderToByteString :: (MonadBase base m, PrimMonad base) => Conduit Builder m S.ByteString
builderToByteString = B.builderToByteString
{-# INLINE builderToByteString #-}
builderToByteStringFlush :: (MonadBase base m, PrimMonad base) => Conduit (Flush Builder) m (Flush S.ByteString)
builderToByteStringFlush = B.builderToByteStringFlush
{-# INLINE builderToByteStringFlush #-}
unsafeBuilderToByteString :: (MonadBase base m, PrimMonad base)
=> IO Buffer
-> Conduit Builder m S.ByteString
unsafeBuilderToByteString = B.unsafeBuilderToByteString
{-# INLINE unsafeBuilderToByteString #-}
builderToByteStringWith :: (MonadBase base m, PrimMonad base)
=> BufferAllocStrategy
-> Conduit Builder m S.ByteString
builderToByteStringWith = B.builderToByteStringWith
{-# INLINE builderToByteStringWith #-}
builderToByteStringWithFlush
:: (MonadBase base m, PrimMonad base)
=> BufferAllocStrategy
-> Conduit (Flush Builder) m (Flush S.ByteString)
builderToByteStringWithFlush = B.builderToByteStringWithFlush
{-# INLINE builderToByteStringWithFlush #-}