Split out DXT-related & [u]int{8|16|32} code into separate files.
Split out the dlopen/dlsym/dlclose functionality too.
Put a level of abstraction/indirection before the DXT code.