Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ IsOpenable()

bool System.IO.Compression.ZipArchiveEntry.IsOpenable ( bool needToUncompress,
bool needToLoadIntoMemory,
out string message )
inlineprivate

Definition at line 755 of file ZipArchiveEntry.cs.

756 {
757 message = null;
759 {
760 if (needToUncompress && CompressionMethod != 0 && CompressionMethod != CompressionMethodValues.Deflate && CompressionMethod != CompressionMethodValues.Deflate64)
761 {
762 CompressionMethodValues compressionMethod = CompressionMethod;
763 if (compressionMethod == CompressionMethodValues.BZip2 || compressionMethod == CompressionMethodValues.LZMA)
764 {
766 }
767 else
768 {
770 }
771 return false;
772 }
774 {
775 message = System.SR.SplitSpanned;
776 return false;
777 }
779 {
781 return false;
782 }
784 if (!ZipLocalFileHeader.TrySkipBlock(_archive.ArchiveReader))
785 {
787 return false;
788 }
790 {
792 return false;
793 }
795 {
796 message = System.SR.EntryTooLarge;
797 return false;
798 }
799 }
800 return true;
801 }
CompressionMethodValues CompressionMethod
static readonly bool s_allowLargeZipArchiveEntriesInUpdateMode
long Seek(long offset, SeekOrigin origin)
static string UnsupportedCompression
Definition SR.cs:122
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string UnsupportedCompressionMethod
Definition SR.cs:124
static string LocalFileHeaderCorrupt
Definition SR.cs:104
static string SplitSpanned
Definition SR.cs:118
static string EntryTooLarge
Definition SR.cs:80
Definition SR.cs:7

References System.IO.Compression.ZipArchiveEntry._archive, System.IO.Compression.ZipArchiveEntry._compressedSize, System.IO.Compression.ZipArchiveEntry._diskNumberStart, System.IO.Compression.ZipArchiveEntry._offsetOfLocalHeader, System.IO.Compression.ZipArchiveEntry._originallyInArchive, System.IO.Compression.ZipArchive.ArchiveReader, System.IO.Compression.ZipArchive.ArchiveStream, System.IO.Compression.ZipArchiveEntry.CompressionMethod, System.SR.EntryTooLarge, System.SR.Format(), System.IO.Stream.Length, System.SR.LocalFileHeaderCorrupt, System.IO.Compression.ZipArchive.NumberOfThisDisk, System.IO.Compression.ZipArchiveEntry.OffsetOfCompressedData, System.IO.Compression.ZipArchiveEntry.s_allowLargeZipArchiveEntriesInUpdateMode, System.IO.Stream.Seek(), System.SR.SplitSpanned, System.IO.Compression.ZipLocalFileHeader.TrySkipBlock(), System.SR.UnsupportedCompression, and System.SR.UnsupportedCompressionMethod.

Referenced by System.IO.Compression.ZipArchiveEntry.ThrowIfNotOpenable().