I'm trying to read a bz2 compressed file using the bzopen and bzread commands. My problem is how do I tell bzread what size the file is so it knows to read to the end? If I use the standard filesize($filename) command it returns the compressed size so the whole file isn't displayed. All of my files vary wildly in size so it's not feasible to just hard code the value. Here is what I have so far.
$file_content = bzread(bzopen($filename, "r"), filesize($filename));
Thanks in advance.