PKM header format

Note: This was originally posted on 28th March 2012 at


I am having a texture compressed with pkm file format (ETC compression). I need to decode the pkm header to get the info like compression format, image width , height, mipmap levels , bits per pixel etc. Can some body point me to pkm header format?