hosc-0.15: Haskell Open Sound Control

Safe Haskell | None
Language | Haskell98

Sound.OSC.Coding.Byte

Description

Byte-level coding utility functions.

Synopsis

- encode_i8 :: Int -> ByteString
- encode_u8 :: Int -> ByteString
- encode_i16 :: Int -> ByteString
- encode_i32 :: Int -> ByteString
- encode_u32 :: Int -> ByteString
- encode_i64 :: Int64 -> ByteString
- encode_u64 :: Word64 -> ByteString
- encode_f32 :: Float -> ByteString
- encode_f64 :: Double -> ByteString
- encode_str :: ASCII -> ByteString
- decode_u8 :: ByteString -> Int
- decode_i8 :: ByteString -> Int
- decode_i16 :: ByteString -> Int
- decode_i32 :: ByteString -> Int
- decode_u32 :: ByteString -> Int
- decode_i64 :: ByteString -> Int64
- decode_u64 :: ByteString -> Word64
- decode_f32 :: ByteString -> Float
- decode_f64 :: ByteString -> Double
- decode_str :: ByteString -> ASCII
- bundleHeader_strict :: ByteString
- bundleHeader :: ByteString
- align :: (Num i, Bits i) => i -> i

# Documentation

encode_i8 :: Int -> ByteString Source #

Encode a signed 8-bit integer.

encode_u8 :: Int -> ByteString Source #

Encode an un-signed 8-bit integer.

encode_i16 :: Int -> ByteString Source #

Encode a signed 16-bit integer.

encode_i32 :: Int -> ByteString Source #

Encode a signed 32-bit integer.

encode_u32 :: Int -> ByteString Source #

Encode an unsigned 16-bit integer.

encode_i64 :: Int64 -> ByteString Source #

Encode a signed 64-bit integer.

encode_u64 :: Word64 -> ByteString Source #

Encode an unsigned 64-bit integer.

encode_f32 :: Float -> ByteString Source #

Encode a 32-bit IEEE floating point number.

encode_f64 :: Double -> ByteString Source #

Encode a 64-bit IEEE floating point number.

encode_str :: ASCII -> ByteString Source #

Encode an ASCII string.

decode_u8 :: ByteString -> Int Source #

Decode an un-signed 8-bit integer.

decode_i8 :: ByteString -> Int Source #

Decode a signed 8-bit integer.

decode_i16 :: ByteString -> Int Source #

Decode a signed 16-bit integer.

decode_i32 :: ByteString -> Int Source #

Decode a signed 32-bit integer.

decode_u32 :: ByteString -> Int Source #

Decode an unsigned 32-bit integer.

decode_i64 :: ByteString -> Int64 Source #

Decode a signed 64-bit integer.

decode_u64 :: ByteString -> Word64 Source #

Decode an unsigned 64-bit integer.

decode_f32 :: ByteString -> Float Source #

Decode a 32-bit IEEE floating point number.

decode_f64 :: ByteString -> Double Source #

Decode a 64-bit IEEE floating point number.

decode_str :: ByteString -> ASCII Source #

Decode an ASCII string.

bundleHeader_strict :: ByteString Source #

Bundle header as a (strict) `ByteString`.

bundleHeader :: ByteString Source #

Bundle header as a lazy ByteString.

align :: (Num i, Bits i) => i -> i Source #

The number of bytes required to align an OSC value to the next 4-byte boundary.

    map align [0::Int .. 7] == [0,3,2,1,0,3,2,1]