| License | BSD-style |
|---|---|
| Maintainer | Vincent Hanquez <vincent@snarc.org> |
| Stability | experimental |
| Portability | unknown |
| Safe Haskell | Safe |
| Language | Haskell98 |
System.Endian
Description
Synopsis
- data Endianness
- getSystemEndianness :: Endianness
- fromLE32 :: Word32 -> Word32
- fromLE64 :: Word64 -> Word64
- fromLE16 :: Word16 -> Word16
- toLE32 :: Word32 -> Word32
- toLE64 :: Word64 -> Word64
- toLE16 :: Word16 -> Word16
- fromBE32 :: Word32 -> Word32
- fromBE64 :: Word64 -> Word64
- fromBE16 :: Word16 -> Word16
- toBE32 :: Word32 -> Word32
- toBE64 :: Word64 -> Word64
- toBE16 :: Word16 -> Word16
Documentation
data Endianness #
represent the CPU endianness
Big endian system stores bytes with the MSB as the first byte. Little endian system stores bytes with the LSB as the first byte.
middle endian is purposely avoided.
Constructors
| LittleEndian | |
| BigEndian |
Instances
| Eq Endianness # | |
Defined in System.Endian | |
| Show Endianness # | |
Defined in System.Endian Methods showsPrec :: Int -> Endianness -> ShowS # show :: Endianness -> String # showList :: [Endianness] -> ShowS # | |
getSystemEndianness :: Endianness #
return the system endianness