private static async Task <Dictionary <XivRace, ExtraSkeletonEntry> > DeserializeEstData(byte[] data, XivDependencyRoot root, uint dataVersion)
        {
            if (dataVersion == 1)
            {
                // Version 1 didn't include EST data, so just get the defaults.
                return(await Est.GetExtraSkeletonEntries(root));
            }


            // 6 Bytes per entry.
            var count = data.Length / 6;
            var ret   = new Dictionary <XivRace, ExtraSkeletonEntry>(count);

            for (int i = 0; i < count; i++)
            {
                var offset   = i * 6;
                var raceCode = BitConverter.ToUInt16(data, offset);
                var setId    = BitConverter.ToUInt16(data, offset + 2);
                var skelId   = BitConverter.ToUInt16(data, offset + 4);

                var race = XivRaces.GetXivRace(raceCode);

                ret.Add(race, new ExtraSkeletonEntry(race, setId, skelId));
            }

            return(ret);
        }
        /// <summary>
        /// Creates a new ItemMetaData entry from the constituent files around the FFXIV file system.
        /// </summary>
        /// <param name="root"></param>
        /// <returns></returns>
        private static async Task <ItemMetadata> CreateFromRaw(XivDependencyRoot root, bool forceDefault = false)
        {
            var _eqp = new Eqp(XivCache.GameInfo.GameDirectory);
            var _imc = new Imc(XivCache.GameInfo.GameDirectory);

            // These functions generate the path::offset to each of our
            // contiguous metadata entries.
            var imcPaths = await root.GetImcEntryPaths();

            var ret = new ItemMetadata(root);

            if (imcPaths.Count > 0)
            {
                ret.ImcEntries = await _imc.GetEntries(imcPaths, forceDefault);
            }

            ret.EqpEntry = await _eqp.GetEqpEntry(root.Info, forceDefault);

            ret.EqdpEntries = await _eqp.GetEquipmentDeformationParameters(root.Info, forceDefault);

            ret.EstEntries = await Est.GetExtraSkeletonEntries(root, forceDefault);

            ret.GmpEntry = await _eqp.GetGimmickParameter(root, forceDefault);

            return(ret);
        }