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

◆ LoadLocalHeaderExtraFieldAndCompressedBytesIfNeeded()

bool System.IO.Compression.ZipArchiveEntry.LoadLocalHeaderExtraFieldAndCompressedBytesIfNeeded ( )
inlinepackage

Definition at line 643 of file ZipArchiveEntry.cs.

644 {
646 {
648 _lhUnknownExtraFields = ZipLocalFileHeader.GetExtraFields(_archive.ArchiveReader);
649 }
651 {
652 int maxLength = Array.MaxLength;
653 _compressedBytes = new byte[_compressedSize / maxLength + 1][];
654 for (int i = 0; i < _compressedBytes.Length - 1; i++)
655 {
656 _compressedBytes[i] = new byte[maxLength];
657 }
658 _compressedBytes[_compressedBytes.Length - 1] = new byte[_compressedSize % maxLength];
660 for (int j = 0; j < _compressedBytes.Length - 1; j++)
661 {
662 ZipHelper.ReadBytes(_archive.ArchiveStream, _compressedBytes[j], maxLength);
663 }
664 ZipHelper.ReadBytes(_archive.ArchiveStream, _compressedBytes[_compressedBytes.Length - 1], (int)(_compressedSize % maxLength));
665 }
666 return true;
667 }
List< ZipGenericExtraField > _lhUnknownExtraFields
long Seek(long offset, SeekOrigin origin)

References System.IO.Compression.ZipArchiveEntry._archive, System.IO.Compression.ZipArchiveEntry._compressedBytes, System.IO.Compression.ZipArchiveEntry._compressedSize, System.IO.Compression.ZipArchiveEntry._everOpenedForWrite, System.IO.Compression.ZipArchiveEntry._lhUnknownExtraFields, System.IO.Compression.ZipArchiveEntry._offsetOfLocalHeader, System.IO.Compression.ZipArchiveEntry._originallyInArchive, System.IO.Compression.ZipArchive.ArchiveReader, System.IO.Compression.ZipArchive.ArchiveStream, System.IO.Compression.ZipLocalFileHeader.GetExtraFields(), System.Array.MaxLength, System.IO.Compression.ZipArchiveEntry.OffsetOfCompressedData, System.IO.Compression.ZipHelper.ReadBytes(), and System.IO.Stream.Seek().