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. jsByteString :: Js -> ByteString

    web-rep Web.Rep.Page

    No documentation available.

  2. renderPageAsByteString :: PageConfig -> Page -> Concerns ByteString

    web-rep Web.Rep.Render

    Render a Page as Text.

  3. renderLazyByteString :: View () () -> ByteString

    web-view Web.View

    No documentation available.

  4. renderLazyByteString :: View () () -> ByteString

    web-view Web.View.Render

    No documentation available.

  5. fromLEByteString :: ByteString -> Word16String

    what4 What4.Utils.Word16String

    Generate a Word16String from a bytestring where the 16bit words are encoded as two bytes in little-endian order. PRECONDITION: the input bytestring must have a length which is a multiple of 2.

  6. toLEByteString :: Word16String -> ByteString

    what4 What4.Utils.Word16String

    Return the underlying little endian bytestring.

  7. xor32LazyByteString :: Word32 -> ByteString -> ByteString

    xor Data.XOR

    Variant of xor32StrictByteString for masking lazy ByteStrings.

    >>> xor32LazyByteString 0x37fa213d "\x7f\x9f\x4d\x51\x58"
    "Hello"
    

  8. xor32ShortByteString :: Word32 -> ShortByteString -> ShortByteString

    xor Data.XOR

    Apply 32-bit XOR mask (considered as four octets in big-endian order) to ShortByteString. See also xor32StrictByteString.

    >>> xor32ShortByteString 0x37fa213d "\x7f\x9f\x4d\x51\x58"
    "Hello"
    

  9. xor32StrictByteString :: Word32 -> ByteString -> ByteString

    xor Data.XOR

    Apply 32-bit XOR mask (considered as four octets in big-endian order) to ByteString.

    >>> xor32StrictByteString 0x37fa213d "\x7f\x9f\x4d\x51\x58"
    "Hello"
    
    In other words, the 32-bit word 0x37fa213d is taken as the infinite series of octets (cycle [0x37,0xfa,0x21,0x3d]) and xored with the respective octets from the input ByteString. The xor laws give rise to the following laws:
    xor32StrictByteString m (xor32StrictByteString m x) == x
    
    xor32StrictByteString 0 x == x
    
    xor32StrictByteString m (xor32StrictByteString n x) == xor32StrictByteString (m `xor` n) x
    
    This function is semantically equivalent to the (less efficient) implementation shown below
    xor32StrictByteString'ref :: Word32 -> BS.ByteString -> BS.ByteString
    xor32StrictByteString'ref 0    = id
    xor32StrictByteString'ref msk0 = snd . BS.mapAccumL go msk0
    where
    go :: Word32 -> Word8 -> (Word32,Word8)
    go msk b = let b'   = fromIntegral (msk' .&. 0xff) `xor` b
    msk' = rotateL msk 8
    in (msk',b')
    
    The xor32StrictByteString implementation is about 6-7 times faster than the naive implementation above.

  10. xor32StrictByteString' :: Word32 -> ByteString -> (Word32, ByteString)

    xor Data.XOR

    Convenience version of xor32StrictByteString which also returns the rotated XOR-mask useful for chained masking.

    >>> xor32StrictByteString' 0x37fa213d "\x7f\x9f\x4d\x51\x58"
    (0xfa213d37,"Hello")
    

Page 84 of many | Previous | Next