472,353 Members | 1,108 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

How to read and write huge binary files

Lad
What is a good way to read binary data from HUGE file and write it
to another file?
Thanks for help
La.

Jan 18 '07 #1
3 1808
In <11**********************@l53g2000cwa.googlegroups .com>, Lad wrote:
What is a good way to read binary data from HUGE file and write it
to another file?
What about `shutil.copy()`?

Ciao,
Marc 'BlackJack' Rintsch
Jan 18 '07 #2
"Lad" <py****@hope.czescribió en el mensaje
news:11**********************@l53g2000cwa.googlegr oups.com...
What is a good way to read binary data from HUGE file and write it
to another file?
Without processing the data read? shutil.copy2 or similar
Else, a lot of applications can follow the pattern read-process-write: read
a logical block, process, write the output; where "logical block" depends on
the application: a record, a frame, a chunk...

--
Gabriel Genellina
Jan 18 '07 #3
"Lad" <py****@hope.czwrote:
>
What is a good way to read binary data from HUGE file and write it
to another file?
How huge? I regularly process 100-megabyte MPEG files in Python, both by
reading the whole thing in as a string, and by using "mmap" to map the file
into memory.
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Jan 19 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Enrico Morelli | last post by:
Dear all, I have to write a program which reads from a binary file, a serious of 32 bit long integer data and stores its in an array. I cannot...
17
by: Guyon Morée | last post by:
what is the difference? if I open a text file in binary (rb) mode, it doesn't matter... the read() output is the same.
3
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...
10
by: Tibby | last post by:
I need to read/write not only text files, but binary as well. It seems like on binary files, it doesn't right the last 10% of the file. -- ...
1
by: tim | last post by:
I have a multi-dimensional byte array, private someArray(,,) as byte and it's huge redim someArray(100,640,480,3) after populating the array, I...
3
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...
3
by: =?Utf-8?B?ZGF2aWQ=?= | last post by:
I try to follow Steve's paper to build a database, and store a small text file into SQL Server database and retrieve it later. Only difference...
6
by: ericunfuk | last post by:
Hi ALL, I want to read a binary file(it's pic.tif file, I guess it's binary file?), then write it to a new file), I have several questions about...
9
by: vineeth | last post by:
Hello all, I have come across a weird problem, I need to determine the amount of bytes read from a file, but couldn't figure it out , My program...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.