Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Read data structure from binary file

  • To: mathgroup at smc.vnet.net
  • Subject: [mg97984] Re: Read data structure from binary file
  • From: dh <dh at metrohm.com>
  • Date: Fri, 27 Mar 2009 05:34:49 -0500 (EST)
  • References: <gqfko0$kih$1@smc.vnet.net>


Hi,

if the file does not contain any information about the structure, it can 

  be interpreted in many ways. Therefore, you have to specify the 

structure.

Note that you may assemble the list of structures definition 

automatically, using e.b. Table, Append, Join...

Daniel



hobz 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 Integer32, 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(file, {"Integer32", "Byte", "Byte", "Byte", "Byte", "Byte", ..., "Byte", "Integer16"}) ?

> 

> Thanks.

> 




  • Prev by Date: Printout stylesheet in V7 on Linux
  • Next by Date: Re: Re: UNDO and Mathematica - how useless is it?
  • Previous by thread: Re: Read data structure from binary file
  • Next by thread: Re: Read data structure from binary file