-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A very efficient ByteString builder implementation based on the binary tree
--   
--   According to <a>the benchmarks</a> this builder implementation beats
--   all the alternatives. It is especially well-suited for generating
--   strict bytestrings, beating the standard builder by at least the
--   factor of 4.
@package bytestring-tree-builder
@version 0.2.7.1

module ByteString.TreeBuilder

-- | A binary-tree-based datastructure optimized for aggregation of
--   bytestrings using the <i>O(1)</i> appending operation.
data Builder

-- | Lifts a bytestring into the builder.
byteString :: ByteString -> Builder

-- | Lifts a single byte into the builder.
byte :: Word8 -> Builder
asciiIntegral :: Integral a => a -> Builder
asciiChar :: Char -> Builder
utf8Char :: Char -> Builder
utf8Ord :: Int -> Builder
utf8Text :: Text -> Builder
utf8LazyText :: Text -> Builder
intercalate :: (Foldable f, Monoid m) => m -> f m -> m

-- | <i>O(1)</i>. Gets the total length.
length :: Builder -> Int

-- | <i>O(n)</i>. Converts the builder into a strict bytestring.
toByteString :: Builder -> ByteString

-- | <i>O(n)</i>. Converts the builder into a lazy bytestring.
toLazyByteString :: Builder -> ByteString
instance GHC.Base.Monoid ByteString.TreeBuilder.Builder
instance Data.Semigroup.Semigroup ByteString.TreeBuilder.Builder
instance Data.String.IsString ByteString.TreeBuilder.Builder
