A
A
Alex Serov2017-05-22 11:11:02
OOP
Alex Serov, 2017-05-22 11:11:02

How to organize the processing of a large file?

It is required to write several algorithms that process WAV files.
The files are about 100 MB in size, so I don't want to load them entirely into memory.
What abstraction should be given to algorithms for accessing signal samples? I'm asking in terms of downloading a file. Define something like an iterator by counts?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
res2001, 2017-05-22
@gibsonman01

The easiest way is to use memory-mapped files, they have already thought about everything for you.

D
DoumanAsh, 2017-05-22
@DoumanAsh

mmap (platform dependent) or reading the file in chunks, if the algorithm allows.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question