void IResData.Save(BfshaFileSaver saver)
        {
            saver.SaveCustom(Frames, () =>
            {
                switch (FrameType)
                {
                case AnimCurveFrameType.Single:
                    saver.Write(Frames);
                    break;

                case AnimCurveFrameType.Decimal10x5:
                    foreach (float frame in Frames)
                    {
                        saver.Write((Decimal10x5)frame);
                    }
                    break;

                case AnimCurveFrameType.Byte:
                    foreach (float frame in Frames)
                    {
                        saver.Write((byte)frame);
                    }
                    break;
                }
            });
            saver.SaveCustom(Keys, () =>
            {
                switch (KeyType)
                {
                case AnimCurveKeyType.Single:
                    foreach (float key in Keys)
                    {
                        saver.Write(key);
                    }
                    break;

                case AnimCurveKeyType.Int16:
                    foreach (float key in Keys)
                    {
                        saver.Write((short)key);
                    }
                    break;

                case AnimCurveKeyType.SByte:
                    foreach (float key in Keys)
                    {
                        saver.Write((sbyte)key);
                    }
                    break;
                }
            });
            saver.Write(_flags);
            saver.Write((ushort)Frames.Length);
            saver.Write(AnimDataOffset);
            saver.Write(StartFrame);
            saver.Write(EndFrame);
            saver.Write(Scale);
            saver.Write(Offset);
            saver.Write(Delta);
        }