| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.BitString.BigEndian
Description
Lazy, big-endian bitstrings, somewhat similar to lazy bytestrings.
In this context, "big-endian" means that the bits in the bytes are in the opposite order than what would be logical. If you ask me, this is doesn't make too much sense, but this convention apparently still have usage...
This module is intended to be imported qualified.
Synopsis
- data BitString
- empty :: BitString
- bitString :: ByteString -> BitString
- bitStringLazy :: ByteString -> BitString
- unsafeBitString' :: Int64 -> Int64 -> ByteString -> BitString
- showBitString :: BitString -> String
- debugShowBitString :: BitString -> String
- take :: Int64 -> BitString -> BitString
- drop :: Int64 -> BitString -> BitString
- splitAt :: Int64 -> BitString -> (BitString, BitString)
- append :: BitString -> BitString -> BitString
- concat :: [BitString] -> BitString
- toList :: BitString -> [Bool]
- fromList :: [Bool] -> BitString
- to01List :: BitString -> [Word8]
- from01List :: [Word8] -> BitString
- null :: BitString -> Bool
- length :: BitString -> Int64
- foldl' :: (a -> Bool -> a) -> a -> BitString -> a
- findSubstring :: BitString -> BitString -> Maybe Int64
- realizeBitStringLazy :: BitString -> ByteString
- realizeBitStringStrict :: BitString -> ByteString
- realizeBitString' :: BitString -> [ByteString]
Documentation
bitString :: ByteString -> BitString Source #
Create a BitString from a strict ByteString
bitStringLazy :: ByteString -> BitString Source #
Create a BitString from a lazy ByteString
Arguments
| :: Int64 | offset |
| -> Int64 | length |
| -> ByteString | source |
| -> BitString |
Create a BitString from a portion of a ByteString.
Warning! No boundary checks are performed!
showBitString :: BitString -> String Source #
debugShowBitString :: BitString -> String Source #
from01List :: [Word8] -> BitString Source #
realizeBitString' :: BitString -> [ByteString] Source #