MathGroup Archive 2010

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

Search the Archive

Re: convert txt to binary file


On Apr 2, 5:21 am, jihane <jihane.aj... at mail.mcgill.ca> wrote:
> Hello all,
>
> I have a 4Gb txt file and it is not possible to work with that because it is huge. Does someone knows how to convert an ascii file to a binary file using mathematica? I have a collegue that does it with another system but I can't find out how to do that. I searched a lot without sucess.
>
> Your help would be extremelly appreciated.
>
> Thank you!

I recommend you read the following post (from the excellent 'Lunchtime
Playground: Fun with Mathematica' blog):

http://mathgis.blogspot.com/2009/03/tip-processing-large-data-sets.html

In a nutshell: use ReadList[] rather than Import[], and read in only
what you need. Other than that, you may want to create a database and
have Mathematica access your data via that route instead.

-RG


  • Prev by Date: Combining elements of a list
  • Next by Date: Re: convert txt to binary file
  • Previous by thread: convert txt to binary file
  • Next by thread: Re: convert txt to binary file