How to read and write huge binary files

L

Lad

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

Marc 'BlackJack' Rintsch

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
 
G

Gabriel Genellina

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...
 
T

Tim Roberts

Lad said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top