dcjones/Zlib.jl — pull request #9 by kmsquire (2013-10-12 02:49:20+00:00)
Title: Read efficiency updates

* increase default buffer size, add `bufsize` argument to `Reader`
* write decompress data directly to `IOBuffer` (using an unexported but likely stable for the near-future interface--see https://github.com/JuliaLang/julia/pull/4484)
* Added optimized `readuntil()` (takes advantage of `IOBuffer` use)
* update to `eof()` to short-circuit buffer filling

With these changes,

* `readline` is ~5-6x faster
* larger buffer sizes offer modest speed improvements

Before these improvements, it took ~13 seconds to read all lines in a 279Mb text file (56Mb compressed). After, it takes ~2.3 seconds with a 4Kb buffer, <2.1 seconds with a 128Kb buffer. For comparison, gzip takes ~2.0 seconds to decompress the file.