Shouldn't Zlib::GzipReader#read return "" when you try to read 0 bytes?
At the moment it returns nil, which differs in behaviour to IO#read.

This wouldn't normally matter, but Marshal sometimes tries to read 0
bytes during its work for some reason which I am trying to investigate
(anyone know what circumstances would cause marshal to do that?)
Regards,
Stephen