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

MathGroup Archive 2009

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

Search the Archive

accessing data in a large file

  • To: mathgroup at smc.vnet.net
  • Subject: [mg95784] accessing data in a large file
  • From: "wb at wavebounce.com" <wb at wavebounce.com>
  • Date: Tue, 27 Jan 2009 06:58:44 -0500 (EST)

I'm trying to get data from a 450MB file. I can get the first 300MB (or 150 000 000 Integer16) with the code below but any more than that causes Mathematica 7 to shut down with out of memory error (WinXP, SP3, 2GB RAM).

n = 150000000; 
inFile = OpenRead["DR.wav", BinaryFormat -> True];
y = BinaryReadList[inFile, "Integer16", n];
Close[inFile];

My reading of the documentation indicates that the only option I have with BinaryReadList is to read from the start of the file to depth n (negative values of n it won't accept). If I could start reading from some point into the file, I could split the file up into pieces by exporting segments to other files. Also, I've found nothing in the documentation that tells me how Mathematica 7 might use the HD to store some of this data as I read it in.  Can anyone suggest a method (however slow) that would allow me access to all the data in this file?  Thanks.


  • Prev by Date: Simplify problem
  • Next by Date: about truetype in linux
  • Previous by thread: Re: Simplify problem
  • Next by thread: Re: accessing data in a large file