Hi All,
I have a .txt file, whose contents need to be read and processed. Which
among the following is the best way to do it?
- Using Sequential file access functions (FileOpen, LineInput, etc)
- Using binary file access functions (File.Open, FileGet, etc)
Thanks,
kd 3 1712
KD,
For me the best choise is not between them, that is the Streamreader, the
speed of a file on disk is never faster than that the disk, which is always
slower than your program, so for performance you should not look for this. http://msdn.microsoft.com/library/de...classtopic.asp
I hope this helps,
Cor
Hi Cor,
When should one use sequential file access and when to use binary acess to
read .txt files?
Thanks,
kd
"Cor Ligthert" wrote: KD,
For me the best choise is not between them, that is the Streamreader, the speed of a file on disk is never faster than that the disk, which is always slower than your program, so for performance you should not look for this.
http://msdn.microsoft.com/library/de...classtopic.asp
I hope this helps,
Cor
KD,
When all characters(bytes) are readable as txt file, you should in my
opinion never use the binary access.
However just my thought, I never tried it because I even don't think about
another way.
Cor This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: kee |
last post by:
Hi All,
I am trying to write binary data to a file, which is bmp image:
Open "d:\temp\test001.bmp" For Binary Access Write As #1
Put #1, 1, strImage
Close #1
*** strImage contains binary...
|
by: simon place |
last post by:
is the code below meant to produce rubbish?, i had expected an exception.
f=file('readme.txt','w')
f.write(' ')
f.read()
( PythonWin 2.3 (#46, Jul 29 2003, 18:54:32) on
win32. )
I got...
|
by: Albert Tu |
last post by:
Dear there,
We have an x-ray CT system. The acquisition computer acquires x-ray
projections and outputs multiple data files in binary format (2-byte
unsigned integer) such as projection0.raw,...
|
by: rayw |
last post by:
I was wondering if there were some good on-line references to the various
pros/cons with these types of file access at all?
Ta
rayw
|
by: nicolasg |
last post by:
Hi,
I'm trying to open a file (any file) in binary mode and save it inside
a new text file.
After that I want to read the source from the text file and save it
back to the disk with its...
|
by: joey.powell |
last post by:
Does anyone know of a .net class that allows for non-sequential reading
of binary files? It would offer a Seek() function or something similar.
The BinaryReader appears to only read forward from...
|
by: JimmyKoolPantz |
last post by:
IDE: Visual Studio 2005
Language: VB.NET
Fox Pro Driver Version: 9.0.0.3504
Problem: I currently have a problem altering a DBF file. I do not get
any syntax errors when running the program. ...
|
by: Timofmars |
last post by:
I'm try to Unload DB2 data from a table into a record sequential file
on NT. I can an unload on Mainframe, but it doesn't seem to be an
option in NT.
In NT, all I can do is export/import. I can...
|
by: rory |
last post by:
I can't seem to append a string to the end of a binary file. I'm using
the following code:
fstream outFile("test.exe", ios::in | ios::out | ios::binary |
ios::ate | ios::app)...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |