/// <summary> /// Decode Stream Footer /// </summary> /// <param name="options"> /// Target for the decoded Stream Header options. /// </param> /// <param name="inp"> /// Beginning of the input buffer of /// LZMA_STREAM_HEADER_SIZE bytes. /// </param> /// <returns> /// <see cref="LzmaResult.OK"/>: Decoding was successful. /// <see cref="LzmaResult.FormatError"/>: Magic bytes don't match, thus the given buffer cannot be Stream Footer. /// <see cref="LzmaResult.DataError"/>: CRC32 doesn't match, thus the Stream Footer is corrupt. /// <see cref="LzmaResult.OptionsError"/>: Unsupported options are present in Stream Footer. /// </returns> /// <remarks> /// If Stream Header was already decoded successfully, but /// decoding Stream Footer returns <see cref="LzmaResult.FormatError"/>, the /// application should probably report some other error message /// than "file format not recognized", since the file more likely /// is corrupt(possibly truncated). Stream decoder in liblzma /// uses <see cref="LzmaResult.DataError"/> in this situation. /// </remarks> /// <seealso href="https://github.com/nobled/xz/blob/master/src/liblzma/api/lzma/stream_flags.h"/> public static LzmaResult lzma_stream_footer_decode(ref LzmaStreamFlags options, byte[] inp) => lzma_stream_footer_decode_ptr(ref options, inp);
internal static extern LzmaResult lzma_stream_footer_decode(ref LzmaStreamFlags options, byte[] inp);