0 | module Data.Bytes.Interfaces
 1 |
 2 | import Data.Vect
 3 |
 4 | %default total
 5 |
 6 | public export
 7 | data Endian = BigEndian | LittleEndian | NetworkEndian
 8 |
 9 | public export
10 | interface Bytes (0 num: Type) | num where
11 |   constructor MkBytes
12 |   byteSize: Nat
13 |   toBytes: Endian -> num -> Vect byteSize Bits8
14 |   fromBytes: Endian -> Vect byteSize Bits8 -> num