Zlib / gzip is probably the most popular library/tool for general data compression. In zlib, there is an API gzseek() which places the file position indicator at a specified offset in the uncompressed file. However, whenever it gets called, it starts from the beginning of the file and reads through all the data up to the specified offset. For huge files, this is very slow. It is actually possible