License | BSD3 |
---|---|
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell98 |
Documentation
Unaligned codes
Unary-coded integers
>>>
runPutL . runEncode $ encode (Unary 1) >> flush
"\128">>>
runPutL . runEncode $ encode (Unary 7) >> flush
"\254"
Enum n => Enum (Unary n) Source # | |
Eq n => Eq (Unary n) Source # | |
Integral n => Integral (Unary n) Source # | |
Num n => Num (Unary n) Source # | |
Ord n => Ord (Unary n) Source # | |
Read n => Read (Unary n) Source # | |
Real n => Real (Unary n) Source # | |
Show n => Show (Unary n) Source # | |
Integral n => Coded (Unary n) Source # | |
Representation for Elias Gamma
and Delta
codes. A positive
integer n
is encoded by encoding the position of its most
significant bit, and then the binary representation of the rest of
the number.
Enum n => Enum (Elias c n) Source # | |
Eq n => Eq (Elias c n) Source # | |
Integral n => Integral (Elias c n) Source # | |
Num n => Num (Elias c n) Source # | |
Ord n => Ord (Elias c n) Source # | |
Read n => Read (Elias c n) Source # | |
Real n => Real (Elias c n) Source # | |
Show n => Show (Elias c n) Source # | |
(Coded c, Integral c, Ranked n) => Coded (Elias c n) Source # | |
type Gamma c = Elias (Unary c) Source #
Elias Gamma codes the position of the most significant in
Unary
.