Hoogle Search
Within LTS Haskell 24.63 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
primMapByteStringBounded :: BoundedPrim Word8 -> StrictByteString -> Builderbytestring Data.ByteString.Builder.Prim Create a Builder that encodes each Word8 of a StrictByteString using a BoundedPrim. For example, we can write a Builder that filters a StrictByteString as follows.
import qualified Data.ByteString.Builder.Prim as P
filterBS p = P.condB p (P.liftFixedToBounded P.word8) P.emptyB
primMapByteStringFixed :: FixedPrim Word8 -> StrictByteString -> Builderbytestring Data.ByteString.Builder.Prim Heavy inlining. Encode all bytes of a StrictByteString from left-to-right with a FixedPrim. This function is quite versatile. For example, we can use it to construct a Builder that maps every byte before copying it to the buffer to be filled.
mapToBuilder :: (Word8 -> Word8) -> S.StrictByteString -> Builder mapToBuilder f = primMapByteStringFixed (contramapF f word8)
We can also use it to hex-encode a StrictByteString as shown by the byteStringHex example above.primMapLazyByteStringBounded :: BoundedPrim Word8 -> LazyByteString -> Builderbytestring Data.ByteString.Builder.Prim Chunk-wise application of primMapByteStringBounded.
primMapLazyByteStringFixed :: FixedPrim Word8 -> LazyByteString -> Builderbytestring Data.ByteString.Builder.Prim Heavy inlining. Encode all bytes of a LazyByteString from left-to-right with a FixedPrim.
type
StrictByteString = ByteStringbytestring Data.ByteString.Internal Type synonym for the strict flavour of ByteString.
mallocByteString :: Int -> IO (ForeignPtr a)bytestring Data.ByteString.Internal Wrapper of mallocForeignPtrBytes with faster implementation for GHC
mkDeferredByteString :: ForeignPtr Word8 -> Int -> IO ByteStringbytestring Data.ByteString.Internal Variant of fromForeignPtr0 that calls deferForeignPtrAvailability
type
LazyByteString = ByteStringbytestring Data.ByteString.Lazy Type synonym for the lazy flavour of ByteString.
type
LazyByteString = ByteStringbytestring Data.ByteString.Lazy.Internal Type synonym for the lazy flavour of ByteString.
-
bytestring Data.ByteString.Short A compact representation of a Word8 vector. It has a lower memory overhead than a ByteString and does not contribute to heap fragmentation. It can be converted to or from a ByteString (at the cost of copying the string data). It supports very few other operations.