58 references to ZipLocalFileHeader
System.IO.Compression (58)
System\IO\Compression\ZipArchiveEntry.Async.cs (4)
104
if (!await
ZipLocalFileHeader
.TrySkipBlockAsync(_archive.ArchiveStream, cancellationToken).ConfigureAwait(false))
207
(_lhUnknownExtraFields, _lhTrailingExtraFieldData) = await
ZipLocalFileHeader
.GetExtraFieldsAsync(_archive.ArchiveStream, cancellationToken).ConfigureAwait(false);
302
if (!await
ZipLocalFileHeader
.TrySkipBlockAsync(_archive.ArchiveStream, cancellationToken).ConfigureAwait(false))
325
byte[] lfStaticHeader = new byte[
ZipLocalFileHeader
.SizeOfLocalHeader];
System\IO\Compression\ZipArchiveEntry.cs (54)
470
if (!
ZipLocalFileHeader
.TrySkipBlock(_archive.ArchiveStream))
703
_lhUnknownExtraFields =
ZipLocalFileHeader
.GetExtraFields(_archive.ArchiveStream, out _lhTrailingExtraFieldData);
931
if (!
ZipLocalFileHeader
.TrySkipBlock(_archive.ArchiveStream))
1136
_archive.ArchiveStream.Seek(
ZipLocalFileHeader
.SizeOfLocalHeader + _storedEntryNameBytes.Length, SeekOrigin.Current);
1153
ZipLocalFileHeader
.SignatureConstantBytes.CopyTo(lfStaticHeader[
ZipLocalFileHeader
.FieldLocations.Signature..]);
1154
BinaryPrimitives.WriteUInt16LittleEndian(lfStaticHeader[
ZipLocalFileHeader
.FieldLocations.VersionNeededToExtract..], (ushort)_versionToExtract);
1155
BinaryPrimitives.WriteUInt16LittleEndian(lfStaticHeader[
ZipLocalFileHeader
.FieldLocations.GeneralPurposeBitFlags..], (ushort)_generalPurposeBitFlag);
1156
BinaryPrimitives.WriteUInt16LittleEndian(lfStaticHeader[
ZipLocalFileHeader
.FieldLocations.CompressionMethod..], (ushort)CompressionMethod);
1157
BinaryPrimitives.WriteUInt32LittleEndian(lfStaticHeader[
ZipLocalFileHeader
.FieldLocations.LastModified..], ZipHelper.DateTimeToDosTime(_lastModified.DateTime));
1158
BinaryPrimitives.WriteUInt32LittleEndian(lfStaticHeader[
ZipLocalFileHeader
.FieldLocations.Crc32..], _crc32);
1159
BinaryPrimitives.WriteUInt32LittleEndian(lfStaticHeader[
ZipLocalFileHeader
.FieldLocations.CompressedSize..], compressedSizeTruncated);
1160
BinaryPrimitives.WriteUInt32LittleEndian(lfStaticHeader[
ZipLocalFileHeader
.FieldLocations.UncompressedSize..], uncompressedSizeTruncated);
1161
BinaryPrimitives.WriteUInt16LittleEndian(lfStaticHeader[
ZipLocalFileHeader
.FieldLocations.FilenameLength..], (ushort)_storedEntryNameBytes.Length);
1162
BinaryPrimitives.WriteUInt16LittleEndian(lfStaticHeader[
ZipLocalFileHeader
.FieldLocations.ExtraFieldLength..], extraFieldLength);
1170
Span<byte> lfStaticHeader = stackalloc byte[
ZipLocalFileHeader
.SizeOfLocalHeader];
1257
private const int MetadataBufferLength =
ZipLocalFileHeader
.FieldLengths.VersionNeededToExtract +
ZipLocalFileHeader
.FieldLengths.GeneralPurposeBitFlags;
1258
private const int CrcAndSizesBufferLength =
ZipLocalFileHeader
.FieldLengths.Crc32 +
ZipLocalFileHeader
.FieldLengths.CompressedSize +
ZipLocalFileHeader
.FieldLengths.UncompressedSize;
1260
private const int Zip64DataDescriptorCrcAndSizesBufferLength =
ZipLocalFileHeader
.Zip64DataDescriptor.FieldLengths.Crc32
1261
+
ZipLocalFileHeader
.Zip64DataDescriptor.FieldLengths.CompressedSize +
ZipLocalFileHeader
.Zip64DataDescriptor.FieldLengths.UncompressedSize;
1330
int relativeVersionToExtractLocation =
ZipLocalFileHeader
.FieldLocations.VersionNeededToExtract -
ZipLocalFileHeader
.FieldLocations.VersionNeededToExtract;
1331
int relativeGeneralPurposeBitFlagsLocation =
ZipLocalFileHeader
.FieldLocations.GeneralPurposeBitFlags -
ZipLocalFileHeader
.FieldLocations.VersionNeededToExtract;
1336
_archive.ArchiveStream.Seek(_offsetOfLocalHeader +
ZipLocalFileHeader
.FieldLocations.VersionNeededToExtract,
1344
_archive.ArchiveStream.Seek(_offsetOfLocalHeader +
ZipLocalFileHeader
.FieldLocations.Crc32,
1348
int relativeCrc32Location =
ZipLocalFileHeader
.FieldLocations.Crc32 -
ZipLocalFileHeader
.FieldLocations.Crc32;
1349
int relativeCompressedSizeLocation =
ZipLocalFileHeader
.FieldLocations.CompressedSize -
ZipLocalFileHeader
.FieldLocations.Crc32;
1350
int relativeUncompressedSizeLocation =
ZipLocalFileHeader
.FieldLocations.UncompressedSize -
ZipLocalFileHeader
.FieldLocations.Crc32;
1367
_archive.ArchiveStream.Seek(_offsetOfLocalHeader +
ZipLocalFileHeader
.SizeOfLocalHeader
1376
int relativeCrc32Location =
ZipLocalFileHeader
.Zip64DataDescriptor.FieldLocations.Crc32 -
ZipLocalFileHeader
.Zip64DataDescriptor.FieldLocations.Crc32;
1377
int relativeCompressedSizeLocation =
ZipLocalFileHeader
.Zip64DataDescriptor.FieldLocations.CompressedSize -
ZipLocalFileHeader
.Zip64DataDescriptor.FieldLocations.Crc32;
1378
int relativeUncompressedSizeLocation =
ZipLocalFileHeader
.Zip64DataDescriptor.FieldLocations.UncompressedSize -
ZipLocalFileHeader
.Zip64DataDescriptor.FieldLocations.Crc32;
1404
ZipLocalFileHeader
.DataDescriptorSignatureConstantBytes.CopyTo(dataDescriptor[
ZipLocalFileHeader
.ZipDataDescriptor.FieldLocations.Signature..]);
1405
BinaryPrimitives.WriteUInt32LittleEndian(dataDescriptor[
ZipLocalFileHeader
.ZipDataDescriptor.FieldLocations.Crc32..], _crc32);
1409
BinaryPrimitives.WriteInt64LittleEndian(dataDescriptor[
ZipLocalFileHeader
.Zip64DataDescriptor.FieldLocations.CompressedSize..], _compressedSize);
1410
BinaryPrimitives.WriteInt64LittleEndian(dataDescriptor[
ZipLocalFileHeader
.Zip64DataDescriptor.FieldLocations.UncompressedSize..], _uncompressedSize);
1412
bytesToWrite =
ZipLocalFileHeader
.Zip64DataDescriptor.FieldLocations.UncompressedSize +
ZipLocalFileHeader
.Zip64DataDescriptor.FieldLengths.UncompressedSize;
1416
BinaryPrimitives.WriteUInt32LittleEndian(dataDescriptor[
ZipLocalFileHeader
.ZipDataDescriptor.FieldLocations.CompressedSize..], (uint)_compressedSize);
1417
BinaryPrimitives.WriteUInt32LittleEndian(dataDescriptor[
ZipLocalFileHeader
.ZipDataDescriptor.FieldLocations.UncompressedSize..], (uint)_uncompressedSize);
1419
bytesToWrite =
ZipLocalFileHeader
.ZipDataDescriptor.FieldLocations.UncompressedSize +
ZipLocalFileHeader
.ZipDataDescriptor.FieldLengths.UncompressedSize;