Sami Sami - 1 year ago 96
PHP Question

How to get content of a single text or a single json file inside a .tar.gz file in PHP?

I have a

file of a folder with 1,000,000 unique
files. I tried to use the
echo $a;
takes forever to load on browser. Any help is appreciated.

Answer Source

A .tar.gz file cannot be accessed randomly. All of the files up to the one you want must be decompressed.

You can try using a .zip file instead, which will permit rapid random access. However the compression of many small files could be much worse, since zip entries are compressed independently and not able to use repeated information in the previous files to aid in the compression of subsequent files.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download