Copyright | (c) Edward Kmett 2013 |
---|---|
License | BSD3 |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- newtype Coding m a = Coding {}
- getAligned :: MonadGet m => m a -> Coding m a
- getBit :: MonadGet m => Coding m Bool
- getBits :: (MonadGet m, Bits b) => Int -> Int -> b -> Coding m b
- getBitsFrom :: (MonadGet m, Bits b) => Int -> b -> Coding m b
- putAligned :: MonadPut m => m a -> Coding m a
- putUnaligned :: (MonadPut m, FiniteBits b) => b -> Coding m ()
- putBit :: MonadPut m => Bool -> Coding m ()
- putBits :: (MonadPut m, Bits b) => Int -> Int -> b -> Coding m ()
- putBitsFrom :: (MonadPut m, Bits b) => Int -> b -> Coding m ()
Documentation
Instances
Get
getAligned :: MonadGet m => m a -> Coding m a Source #
getBit :: MonadGet m => Coding m Bool Source #
Get
a single bit, consuming an entire byte
if the bit buffer is empty
Put
putAligned :: MonadPut m => m a -> Coding m a Source #
putUnaligned :: (MonadPut m, FiniteBits b) => b -> Coding m () Source #
Put
all the bits without a flush
putBit :: MonadPut m => Bool -> Coding m () Source #
Put
a single bit, emitting an entire byte
if the bit buffer is full