This is necessary for an optimization in Warp, where we already have a pool of raw buffers available which I'd like to reuse for blaze-builder. Relevant issue: yesodweb/wai#198
Add a function that directly converts a Write to a ByteString
This function is useful when you want to efficiently construct a short fixed-sized bytestring.
fix typo of system
Foreign.Unsafe was only introduced in later GHC versions and made mandatory after GHC 7.6.
fix build warning
- contrary to the implementations in Data.ByteString, these implementations call the predicate for every element only once instead of twice. Therefore, we achieve double the speed for more expensive predicates.
- Appended builders were also transfer encoded. This is now fixed.
- faster 'splitAt' for lazy bytestrings - block-wise writing of lazy bytestrings - block-wise intersperse for strict and lazy bytestrings