binary-strict-0.4.5: Binary deserialisation using strict ByteStringsSource codeContentsIndex
Data.Binary.Strict.BitUtil
Synopsis
topNBits :: Int -> Word8
bottomNBits :: Int -> Word8
leftShift :: Int -> ByteString -> ByteString
rightShift :: Int -> ByteString -> ByteString
leftTruncateBits :: Int -> ByteString -> ByteString
rightTruncateBits :: Int -> ByteString -> ByteString
Documentation
topNBits :: Int -> Word8Source
This is used for masking the last byte of a ByteString so that extra bits don't leak in
bottomNBits :: Int -> Word8Source
Return a Word8 with the bottom n bits set
leftShift :: Int -> ByteString -> ByteStringSource
Shift the whole ByteString some number of bits left where 0 <= n < 8
rightShift :: Int -> ByteString -> ByteStringSource
Shift the whole ByteString some number of bits right where 0 <= n < 8
leftTruncateBits :: Int -> ByteString -> ByteStringSource
Truncate a ByteString to a given number of bits (counting from the left) by masking out extra bits in the last byte
rightTruncateBits :: Int -> ByteString -> ByteStringSource
Truncate a ByteString to a given number of bits (counting from the right) by masking out extra bits in the first byte
Produced by Haddock version 2.4.2