Is there a way to read tar.gz top lines without uncompression?
I have 1000+ *.tar.gz files with size 4G+ each. But the only thing that I needed is the top 5 lines of each file. I am wondering whether there is a fast way to read these lines without uncompressing process (it takes 3-5 minutes to uncompress a single file). My platform is Linux.
No, there isn't any faster way. The issue is that .tar file is stream of concatenated original files (with some meta information). gzip then adds compression of full archive. Therefore even to just get the list of the files the archive has to be uncompressed first.
How to get JMeter to request gzipped content?
Check the total content size of a tar gz file
Reversing the effects of mkimage to get an original gzipped file back
How can I check that the nginx gzip_static module is working?
Creating a gzip stream using zlib
Applying GZIP for a website under IIS?
How to check if a Unix .tar.gz file is a valid file without uncompressing?
gzip several files and pipe them into one input
Accept-Encoding headers being sent by browser but not received by server
serving gziped files only - a good idea?
Combining deflate and minify - am i creating overhead?
How can I decompress a gzip stream with zlib?
How does the GZip algorithm work? [closed]
Can I uncompress .NET GZipStream using zlib?
How do I tar a directory of files and folders without including the directory itself?
Yslow doesnt recognize my gzip