Hoogle Search

Within LTS Haskell 24.43 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. toByteStringIO :: (ByteString -> IO ()) -> Builder -> IO ()

    streaming-commons Data.Streaming.ByteString.Builder

    Run the builder with a defaultChunkSized buffer and execute the given IO action whenever the buffer is full or gets flushed.

    toByteStringIO = toByteStringIOWith defaultChunkSize
    
    Since 0.1.9

  2. toByteStringIOWith :: Int -> (ByteString -> IO ()) -> Builder -> IO ()

    streaming-commons Data.Streaming.ByteString.Builder

    toByteStringIOWith bufSize io b runs the builder b with a buffer of at least the size bufSize and executes the IO action io whenever the buffer is full. Compared to toLazyByteStringWith this function requires less allocation, as the output buffer is only allocated once at the start of the serialization and whenever something bigger than the current buffer size has to be copied into the buffer, which should happen very seldomly for the default buffer size of 32kb. Hence, the pressure on the garbage collector is reduced, which can be an advantage when building long sequences of bytes. Since 0.1.9

  3. toByteStringIOWithBuffer :: Int -> (ByteString -> IO ()) -> Builder -> ForeignPtr Word8 -> IO ()

    streaming-commons Data.Streaming.ByteString.Builder

    Use a pre-existing buffer to toByteStringIOWith. Since 0.1.9

  4. genByteString :: RandomGen g => Int -> g -> (ByteString, g)

    MonadRandom Control.Monad.Random.Lazy

    Generates a ByteString of the specified size using a pure pseudo-random number generator. See uniformByteStringM for the monadic version.

    Examples

    >>> import System.Random
    
    >>> import Data.ByteString
    
    >>> let pureGen = mkStdGen 137
    
    >>> unpack . fst . genByteString 10 $ pureGen
    [51,123,251,37,49,167,90,109,1,4]
    

  5. genShortByteString :: RandomGen g => Int -> g -> (ShortByteString, g)

    MonadRandom Control.Monad.Random.Lazy

    genShortByteString n g returns a ShortByteString of length n filled with pseudo-random bytes.

  6. genByteString :: RandomGen g => Int -> g -> (ByteString, g)

    MonadRandom Control.Monad.Random.Strict

    Generates a ByteString of the specified size using a pure pseudo-random number generator. See uniformByteStringM for the monadic version.

    Examples

    >>> import System.Random
    
    >>> import Data.ByteString
    
    >>> let pureGen = mkStdGen 137
    
    >>> unpack . fst . genByteString 10 $ pureGen
    [51,123,251,37,49,167,90,109,1,4]
    

  7. genShortByteString :: RandomGen g => Int -> g -> (ShortByteString, g)

    MonadRandom Control.Monad.Random.Strict

    genShortByteString n g returns a ShortByteString of length n filled with pseudo-random bytes.

  8. fromByteString :: Storable t => ByteString -> Vector t

    hmatrix Numeric.LinearAlgebra.Devel

    No documentation available.

  9. toByteString :: Storable t => Vector t -> ByteString

    hmatrix Numeric.LinearAlgebra.Devel

    No documentation available.

  10. fromByteString :: ByteString -> IO (InputStream ByteString)

    io-streams System.IO.Streams.ByteString

    Creates an InputStream from a ByteString.

Page 44 of many | Previous | Next