Do not use read. Use readFrame instead, since read will re-read everything from beginning to end.
i = 1;
i = i + 1;
If that doesn't work, are you using a solid state hard drive, or a spinning magnetic hard drive? The SSD might speed things up as this could be a read/write speed issue. Otherwise the compression/decompression could be the slow step.