hosc-0.20: Haskell Open Sound Control
Safe HaskellSafe-Inferred
LanguageHaskell2010

Sound.Osc.Coding.Decode.Binary

Description

Optimised decode function for Osc packets.

Synopsis

Documentation

decodeMessage :: ByteString -> Message Source #

Decode an Osc Message from a lazy ByteString.

let b = ByteString.Lazy.pack [47,103,95,102,114,101,101,0,44,105,0,0,0,0,0,0]
decodeMessage b == Message "/g_free" [Int32 0]

decodeBundle :: ByteString -> Bundle Source #

Decode an Osc Bundle from a lazy ByteString.

decodePacket :: ByteString -> Packet Source #

Decode an Osc packet from a lazy ByteString.

let b = ByteString.Lazy.pack [47,103,95,102,114,101,101,0,44,105,0,0,0,0,0,0]
decodePacket b == Packet_Message (Message "/g_free" [Int32 0])

decodePacket_strict :: ByteString -> Packet Source #

Decode an Osc packet from a strict Char8 ByteString.