Re: writing binary files



"mermadak" <mermadak@xxxxxxxxx> wrote:

>
> "John Bokma" <john@xxxxxxxxxxxxxxx> wrote in message
> news:Xns96A8BA198CF8castleamber@xxxxxxxxxxxxxx
>>> Also, the parts of this that really make it an issue is that the
>>> data is coming off of a DOS machine (so endian is a concern here
>>> right?) and is a rather large text file with a ton of scientific
>>> data points (from 500k to 5MB files).
>>
>> So basically you want to convert numbers in a text file to some short
>> binary notation?
>
> Exactly... any ideas?

Python or Perl, since your post referred to Python :-D

>> 5MB... you are aware that the current year is 2005? :-)
>
> Does that mean 5MB shouldn't be a problem???

Yup, your computer probably has 100 times as much memory.

> I originally tried writing a program to simply maniplute these files
> in my native programming languages of VB and C++ which would hang due
> to the size of these files.

If a C++ program would hang on 5MB files, how can programs handle 10M
MP3 files, or 700 MB movies?

> I finally found a PERL script that would

PERL is not an acronym :-)

> handle parsing this much data.

Again: 5MB is not much. My best guess is that you should rethink your
algoritm(s).

--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html

.



Relevant Pages

  • Recommend an E-book Meeting the Following Criteria (Newbie, Long)
    ... I know several programming languages namely Java, Perl and C in this order ... Now I'm wondering which Python book I should get as there are so many out ... I'd like to mostly concentrate on language features but some pointers ...
    (comp.lang.python)
  • Re: Python or PHP?
    ... If it's one of the things for which Python ... every language here and there more ways to do something. ... you make Perl more complicated than it is:-D. ... Not the programmer. ...
    (comp.lang.python)
  • Re: Choosing Perl/Python for my particular niche
    ... >> For most general purpose tasks, I reach for Python first. ... > syntax and perhaps my lack of bottomless commitment (knowing Perl would not be ... verilog) so that it can be used for another e.g. verilator, ... using a standalone simulator to simulate the original verilog. ...
    (comp.lang.perl.misc)
  • Re: Choosing Perl/Python for my particular niche
    ... >> For most general purpose tasks, I reach for Python first. ... > syntax and perhaps my lack of bottomless commitment (knowing Perl would not be ... verilog) so that it can be used for another e.g. verilator, ... using a standalone simulator to simulate the original verilog. ...
    (comp.lang.python)
  • Re: Choosing Perl/Python for my particular niche
    ... My area of research is in CAD algorithms, ... I didn't know that Perl was particularly strong ... >> of learning both Perl and Python. ...
    (comp.lang.perl.misc)