Re: Read data structure from binary file
- To: mathgroup at smc.vnet.net
- Subject: [mg97983] Re: Read data structure from binary file
- From: ragfield <ragfield at gmail.com>
- Date: Fri, 27 Mar 2009 05:34:37 -0500 (EST)
- References: <gqfko0$kih$1@smc.vnet.net>
On Mar 26, 5:17 am, hobz <h... at hotmail.com> wrote:
> I have a binary file which I would like to read into a data structure.
> The data structure contains some simple data types like Integer16 and Int=
eger32, but also a byte array of length 255.
>
> How can I read this byte array into mathematica along with the other data=
types as a complete data structure, without having to use BinaryReadList(f=
ile, {"Integer32", "Byte", "Byte", "Byte", "Byte", "Byte", ..., "Byte", "In=
teger16"}) ?
>
> Thanks.
Join[{"Integer32"}, Table["Byte", {255}], {"Integer16"}]
-Rob