i just recalled one more technique for really fast i/o: memory-mapped files. i've even developed os-independent library for m/m files, but it is written in Haskell

m/m files have its own drawbacks but at very least using it avoids superfluous data copying to/from i/o buffers which is important for programs like quicklz whose speed is ~1/3 of memcpy()