Invalid or unsupported compression

I have a php video script which works fine with about a thousand records.
Once it hits about 3000 records it starts giving an error about compression. The error from firefox is:

The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.

The only sort of compression i can think of that is being used in the code is something like

ob_start();
print_r($data);
$str = ob_get_contents();
ob_end_clean();

That’s used a few times through in some of the files.
When i view the source of the page nothing is being output.

Any ideas what could be wrong or how i can fix this?
thanks in advance…