[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: I/O fo binary data
- From: Thijs Schreijer <thijs@...>
- Date: Sun, 17 Nov 2013 20:29:55 +0000
> -----Original Message-----
> From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org] On
> Behalf Of Marc Balmer
> Sent: zondag 17 november 2013 11:32
> To: Lua mailing list
> Subject: I/O fo binary data
>
> Hi
>
> How do you deal with I/O of binary data? Do you use the standard io
> functions somehow or did you write your own bindings?
>
> As strings are 8-bit clean and can contain embedded zeroes, I have the
> feeling that they can be well used for binary data.
>
> Any thoughts, experiences, etc.?
Depends on your I/O, what's your usecase, what type of data, where is or coming from or going to...
I wrote some drivers for RS232 connected devices which supported lots of different formats, usually byte sequences, not particularly representing ints or floats and the like. So I used strings and did all parsing/building in Lua.
Thijs