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

◆ WriteLocalFileHeaderAndDataIfNeeded()

void System.IO.Compression.ZipArchiveEntry.WriteLocalFileHeaderAndDataIfNeeded ( )
inlineprivate

Definition at line 885 of file ZipArchiveEntry.cs.

886 {
887 if (_storedUncompressedData != null || _compressedBytes != null)
888 {
889 if (_storedUncompressedData != null)
890 {
892 using Stream destination = new DirectToArchiveWriterStream(GetDataCompressor(_archive.ArchiveStream, leaveBackingStreamOpen: true, null), this);
897 return;
898 }
899 if (_uncompressedSize == 0L)
900 {
902 }
904 if (_uncompressedSize != 0L)
905 {
907 foreach (byte[] array in compressedBytes)
908 {
910 }
911 }
912 }
913 else if (_archive.Mode == ZipArchiveMode.Update || !_everOpenedForWrite)
914 {
915 _everOpenedForWrite = true;
917 }
918 }
CheckSumAndSizeWriteStream GetDataCompressor(Stream backingStream, bool leaveBackingStreamOpen, EventHandler onClose)
bool WriteLocalFileHeader(bool isEmptyFile)
override long Seek(long offset, SeekOrigin loc)
override void Dispose(bool disposing)
override void CopyTo(Stream destination, int bufferSize)
void Write(byte[] buffer, int offset, int count)

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._storedUncompressedData, System.IO.Compression.ZipArchiveEntry._uncompressedSize, System.IO.Compression.ZipArchive.ArchiveStream, System.array, System.IO.MemoryStream.CopyTo(), System.destination, System.IO.MemoryStream.Dispose(), System.IO.Compression.ZipArchiveEntry.GetDataCompressor(), System.L, System.IO.MemoryStream.Length, System.IO.Compression.ZipArchive.Mode, System.IO.MemoryStream.Seek(), System.IO.Stream.Write(), and System.IO.Compression.ZipArchiveEntry.WriteLocalFileHeader().

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