How to read and write huge binary files

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lad

    How to read and write huge binary files

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

  • Marc 'BlackJack' Rintsch

    #2
    Re: How to read and write huge binary files

    In <1169136850.518 228.103360@l53g 2000cwa.googleg roups.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

    Comment

    • Gabriel Genellina

      #3
      Re: How to read and write huge binary files

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

      --
      Gabriel Genellina


      Comment

      • Tim Roberts

        #4
        Re: How to read and write huge binary files

        "Lad" <python@hope.cz wrote:
        >
        >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

        Working...