bitcoin-hs-0.0.1: Partial implementation of the Bitcoin protocol (as of 2013)

Safe HaskellNone
LanguageHaskell98

Bitcoin.Misc.Endian

Description

Dealing with endianness issues

Synopsis

Documentation

data Endian Source #

Constructors

LittleEndian 
BigEndian 

Instances

toMachineBytes :: HasByteOrder a => a -> [Word8] Source #

Native memory order

fromMachineBytes :: HasByteOrder a => [Word8] -> a Source #

Native memory order

swapByteOrderToLE :: HasByteOrder a => a -> a Source #

on little-endian hosts, this is identity; on big-endian hosts, it swaps the byte order

swapByteOrderToBE :: HasByteOrder a => a -> a Source #

on big-endian hosts, this is identity; on little-endian hosts, it swaps the byte order