469,291 Members | 1,859 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,291 developers. It's quick & easy.

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 1755
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Enrico Morelli | last post: by
17 posts views Thread by Guyon Morée | last post: by
10 posts views Thread by Tibby | last post: by
3 posts views Thread by nicolasg | last post: by
3 posts views Thread by =?Utf-8?B?ZGF2aWQ=?= | last post: by
6 posts views Thread by ericunfuk | last post: by
9 posts views Thread by vineeth | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.