diff --git a/SabreTools.FileTypes/Archives/SevenZipArchive.cs b/SabreTools.FileTypes/Archives/SevenZipArchive.cs index f65be0b5..12ee27f2 100644 --- a/SabreTools.FileTypes/Archives/SevenZipArchive.cs +++ b/SabreTools.FileTypes/Archives/SevenZipArchive.cs @@ -15,8 +15,6 @@ namespace SabreTools.FileTypes.Archives /// public class SevenZipArchive : BaseArchive { - #region Constants - /* Torrent7z Header Format http://cpansearch.perl.org/src/BJOERN/Compress-Deflate7-1.0/7zip/DOC/7zFormat.txt @@ -24,44 +22,6 @@ namespace SabreTools.FileTypes.Archives 06-07 ArchiveVersion (0x00, 0x03) The rest is unknown */ - private readonly static byte[] Torrent7ZipHeader = [0x37, 0x7a, 0xbc, 0xaf, 0x27, 0x1c, 0x00, 0x03]; - private readonly static byte[] Torrent7ZipSignature = [0xa9, - 0xa9, - 0x9f, - 0xd1, - 0x57, - 0x08, - 0xa9, - 0xd7, - 0xea, - 0x29, - 0x64, - 0xb2, - 0x36, - 0x1b, - 0x83, - 0x52, - 0x33, - 0x00, - 0x74, - 0x6f, - 0x72, - 0x72, - 0x65, - 0x6e, - 0x74, - 0x37, - 0x7a, - 0x5f, - 0x30, - 0x2e, - 0x39, - 0x62, - 0x65, - 0x74, - 0x61]; - - #endregion #region Constructors diff --git a/SabreTools.FileTypes/Archives/TapeArchive.cs b/SabreTools.FileTypes/Archives/TapeArchive.cs index 942fc952..5849c15e 100644 --- a/SabreTools.FileTypes/Archives/TapeArchive.cs +++ b/SabreTools.FileTypes/Archives/TapeArchive.cs @@ -1,12 +1,12 @@ using System; using System.Collections.Generic; using System.IO; +#if NET462_OR_GREATER || NETCOREAPP using System.Linq; using Compress; using SabreTools.Core.Tools; using SabreTools.Hashing; using SabreTools.Matching; -#if NET462_OR_GREATER || NETCOREAPP using SharpCompress.Archives; using SharpCompress.Archives.Tar; using SharpCompress.Common; diff --git a/SabreTools.FileTypes/Archives/XZArchive.cs b/SabreTools.FileTypes/Archives/XZArchive.cs index 814572f5..5c867474 100644 --- a/SabreTools.FileTypes/Archives/XZArchive.cs +++ b/SabreTools.FileTypes/Archives/XZArchive.cs @@ -4,8 +4,8 @@ using System.IO; using System.Text.RegularExpressions; using SabreTools.Core.Tools; using SabreTools.Hashing; -using SabreTools.IO.Extensions; #if NET462_OR_GREATER || NETCOREAPP +using SabreTools.IO.Extensions; using SharpCompress.Compressors.Xz; #endif @@ -16,8 +16,6 @@ namespace SabreTools.FileTypes.Archives /// public class XZArchive : BaseArchive { - #region Constants - /* (Torrent)XZ Header Format https://tukaani.org/xz/xz-file-format.txt @@ -25,9 +23,6 @@ namespace SabreTools.FileTypes.Archives 06 Flags (0x01 - CRC32, 0x04 - CRC64, 0x0A - SHA-256) 07-0A Flags CRC32 (uint, little-endian) */ - private readonly static byte[] TorrentXZHeader = new byte[] { 0xfd, 0x37, 0x7a, 0x58, 0x5a, 0x00, 0x01, 0x69, 0x22, 0xde, 0x36 }; - - #endregion #region Fields diff --git a/SabreTools.FileTypes/Archives/ZipArchive.cs b/SabreTools.FileTypes/Archives/ZipArchive.cs index 4c0132ff..91c3d0b0 100644 --- a/SabreTools.FileTypes/Archives/ZipArchive.cs +++ b/SabreTools.FileTypes/Archives/ZipArchive.cs @@ -18,16 +18,6 @@ namespace SabreTools.FileTypes.Archives /// public class ZipArchive : BaseArchive { - #region Constants - - private const uint LocalFileHeaderSignature = 0x04034b50; - private const uint EndOfLocalFileHeaderSignature = 0x08074b50; - private const uint CentralDirectoryHeaderSignature = 0x02014b50; - private const uint EndOfCentralDirSignature = 0x06054b50; - private const uint Zip64EndOfCentralDirSignature = 0x06064b50; - private const uint Zip64EndOfCentralDirectoryLocator = 0x07064b50; - private const uint TorrentZipFileDateTime = 0x2198BC00; - /* TorrentZip Header Format https://pkware.cachefly.net/webdocs/APPNOTE/APPNOTE_6.2.0.txt http://www.romvault.com/trrntzip_explained.doc @@ -39,9 +29,6 @@ namespace SabreTools.FileTypes.Archives 0A-0B Last mod file time (0x00, 0xBC) 0C-0D Last mod file date (0x98, 0x21) */ - private readonly static byte[] TorrentZipHeader = new byte[] { 0x50, 0x4b, 0x03, 0x04, 0x14, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0xbc, 0x98, 0x21 }; - - #endregion #region Constructors