add support for reading compressed data