I've spent a couple of days to look at the format used by LDD to store its bricks.
I had to debate a bit with myself if I wanted to release it, but I concluded that a viewer couldn't hurt.
As of now, it only shows .g files that do not have .g1, .g2, etc files of the same name.
You'll find that you can still view such parts, but they'll not show any geometry at all, or parts of it are missing.
I'd recommend extracting the assets.lif, then the db.lif, then dump the .jar file in there, then run it.
The file format itself is a custom format, as we found out, and clearly designed to be used with openGL, which is the renderer used by LDD.
For most files, less than half of the .g file is used to describe the geometry. The rest of the file I have sortof mapped out, but haven't found out what it contains.
I have considered posting the specification of the file format as far as I managed to map it out, but I'm a bit cautious to do so given that I can not oversee the implications of a brick geometry file converter with respect to lego's copyright enforcement. It's still reverse engineering either way.
Controls:
arrow keys: rotate X and Y axis
Q/W: rotate Z axis
A/Z: zoom in/out
N/M: wireframe off/on
Download Link