First page Back Continue Last page Overview Graphics
Case study II: Efficiently reading bytes from a large file
Suppose we are given a very large file which contains a list of n bytes.
Each byte represents some code word in a secret language.
Our task is to read the bytes one after the other, and then use a decoder that we have been provided with to decode their meaning.
Here is what our (bad) code would look like: