> On Jul 8, 2016, at 2:12 AM, Tino Heth via swift-users <swift-users@swift.org> 
> wrote:
> 
> But arrays are no option for me, because my data isn't structured that way:
> It's a stream of different elements (timestamp, type, and a payload that 
> depends on the type), so I have evaluate byte-by-byte…

This is the sort of thing a good stream API should be able to handle 
efficiently, i.e. methods to read/write various binary data types like 
integers. Or alternatively, an API to encode/decode those types into an 
ArraySlice (like Go’s encoding/binary package.) 

Hopefully these can be added to the Swift standard library. In the interim, 
something like that Go package could be implemented with some small C functions 
callable from Swift.

—Jens
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to