/// <summary>
 ///  Loads and decompiles the ANM animation script entry and outputs it to the specified file.
 /// </summary>
 /// <param name="entry">The entry to extract from.</param>
 /// <param name="outFile">The output file to write the decompiled script to.</param>
 /// <param name="encoding">The output encoding, <see cref="CatUtils.ShiftJIS"/> if null.</param>
 ///
 /// <exception cref="ArgumentNullException">
 ///  <paramref name="entry"/> or <paramref name="outFile"/> is null.
 /// </exception>
 public static void DecompileAnimationToFile(this KifintEntry entry, string outFile, Encoding encoding = null)
 {
     if (entry == null)
     {
         throw new ArgumentNullException(nameof(entry));
     }
     using (var stream = entry.ExtractToStream())
         AnmAnimation.DecompileToFile(stream, entry.FileName, outFile, encoding);
 }
 /// <summary>
 ///  Extracts the ANM animation script from the open KIFINT archive stream.
 /// </summary>
 /// <param name="entry">The entry to extract from.</param>
 /// <param name="kifintStream">The stream to the open KIFINT archive.</param>
 /// <returns>The extracted animation script.</returns>
 ///
 /// <exception cref="ArgumentNullException">
 ///  <paramref name="entry"/> or <paramref name="kifintStream"/> is null.
 /// </exception>
 public static AnmAnimation ExtractAnimation(this KifintEntry entry, KifintStream kifintStream)
 {
     if (entry == null)
     {
         throw new ArgumentNullException(nameof(entry));
     }
     using (var stream = entry.ExtractToStream(kifintStream))
         return(AnmAnimation.Extract(stream, entry.FileName));
 }
 /// <summary>
 ///  Loads and decompiles the ANM animation script entry and returns the script as a string.
 /// </summary>
 /// <param name="entry">The entry to extract from.</param>
 /// <returns>The decompiled script.</returns>
 ///
 /// <exception cref="ArgumentNullException">
 ///  <paramref name="entry"/> is null.
 /// </exception>
 public static string DecompileAnimation(this KifintEntry entry)
 {
     if (entry == null)
     {
         throw new ArgumentNullException(nameof(entry));
     }
     using (var stream = entry.ExtractToStream())
         return(AnmAnimation.Decompile(stream, entry.FileName));
 }