Why the change from .tgz to .o3dtgz?

Thursday, May 7, 2009 | 1:26 PM

We recently released an update to O3D with quite a few bug fixes. One of the issues that came up just after launch made us to change the default file extension used by our samples. Originally our samples used a file extension of ".tgz". This caused an issue with overly helpful web servers.

The issue was that some web servers are configured to notice if a file has the extension ".tgz" and if so they do special processing. They assume the file is a pre-compressed gzipped file and they negotiate with the browser on how to send it.

For some browsers the browser says to the server, "I understand gzipped files so send it to me compressed and I'll uncompress it". The problem when that happens is the browser doesn't tell O3D the size of the file before the download starts and so there is no way for O3D to supply progress information.

For other browsers the browser says to the server, "I don't understand gzipped files" and so the server decides to helpfully uncompress it and send the uncompressed data over the internet. The problem with that is the whole point of compressing it in the first place was to make it download faster.

One solution is to reconfigure your server to not do that. Unfortunately that's not always easy. Maybe you do actually want your server to do that for some files, just not files needed by O3D. On top of that, many users don't have direct access to the servers they put their content on, so, reconfiguring the server is probably out of the question.

The easier solution was to rename the files to something that doesn't end with ".tgz". This seemed to solve the problem on most of the servers we tried.

Truthfully, O3D doesn't care what the file extension is. If you want to name your files with ".foo" or ".bar" or ".myappscene" or with no extension any of those are fine. We could have left the extension as ".tgz" and just told people, who ran into the issue mentioned above, to rename their files but it seemed better to us to just make the default something else and therefore save a large number of people the frustration.

The point we want to make clear though is that ".o3dtgz" is not a new file format. We are not defining a file format for O3D as mentioned by several of our blog posts. See Why JSON Rulez for a few good reasons.

We hope that clears up the mystery.

0 comments: