PVRParser = function (data)
{
    var header = new Uint32Array(data, 0, 13);

    // VERSION
    var version = header[0];
    var versionMatch = version === 0x03525650;

    //  PIXEL_FORMAT_INDEX
    var pvrFormat = versionMatch ? header[2] : header[3];

    // Colour Space
    var colorSpace = header[4];

    var internalFormat = FORMATS[pvrFormat].glFormat[colorSpace];
    var sizeFunction = FORMATS[pvrFormat].sizeFunc;

    //  MIPMAPCOUNT_INDEX
    var mipmapLevels = header[11];

    //  WIDTH_INDEX
    var width = header[7];

    //  HEIGHT_INDEX
    var height = header[6];

    //  HEADER_SIZE + METADATA_SIZE_INDEX
    var dataOffset = 52 + header[12];

    var image = new Uint8Array(data, dataOffset);

    var mipmaps = new Array(mipmapLevels);

    var offset = 0;
    var levelWidth = width;
    var levelHeight = height;

    for (var i = 0; i < mipmapLevels; i++)
    {
        var levelSize = sizeFunction(levelWidth, levelHeight);

        mipmaps[i] = {
            data: new Uint8Array(image.buffer, image.byteOffset + offset, levelSize),
            width: levelWidth,
            height: levelHeight
        };

        levelWidth = Math.max(1, levelWidth >> 1);
        levelHeight = Math.max(1, levelHeight >> 1);

        offset += levelSize;
    }

    return {
        mipmaps: mipmaps,
        width: width,
        height: height,
        internalFormat: internalFormat,
        compressed: true,
        generateMipmap: false
    };
}
Parses a PVR format Compressed Texture file and generates texture data suitable for WebGL from it.

@function Phaser.Textures.Parsers.PVRParser
@memberof Phaser.Textures.Parsers
@since 3.60.0

@param {ArrayBuffer} data - The data object created by the Compressed Texture File Loader.

@return {Phaser.Types.Textures.CompressedTextureData} The Compressed Texture data.