"Lad" <python@hope.cz escribió en el mensaje
news:1169136850 .518228.103360@ l53g2000cwa.goo glegroups.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...
>
>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, timr@probo.com
Providenza & Boekelheide, Inc.
Comment