The typelib is a to disk version of the GIR designed to be fast, memory efficient and complete enough so that language bindings can be written on top of it without other sources of information. It is normally compiled from a GIR when a library/program is installed and accessed from the language binding or another application who wishes to use the information. The purpose of it is to provide a common structure to access the complete available API that a library or other unit of code exports. It is meant to be language agnostic using namespaces to separate core, language or library specific functionality. There are currently only C based tools that work on the format, but it’s meant to be usable to use in other situations, for instance to/from another set of languages.