diff options
| author | Marin Ivanov <[email protected]> | 2024-03-29 00:01:55 +0200 |
|---|---|---|
| committer | Marin Ivanov <[email protected]> | 2024-03-29 00:01:55 +0200 |
| commit | f1fdc384ae82da620d53c1660bf4969beed992e6 (patch) | |
| tree | c2f8641c924097338e950de6ee3877756fc47f76 /struct.go | |
| parent | 90394d8b5b2a4c6bcf29692e6d4ab79c598928b1 (diff) | |
wip
Diffstat (limited to 'struct.go')
| -rw-r--r-- | struct.go | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -41,7 +41,7 @@ const ( fileHeaderLen = 26 // + filename + extra directoryHeaderLen = 42 // + filename + extra + comment directoryEndLen = 18 // + comment - dataDescriptorLen = 16 // four uint32: descriptor signature, crc32, compressed size, size + dataDescriptorLen = 12 // four uint32: descriptor signature, crc32, compressed size, size dataDescriptor64Len = 24 // two uint32: signature, crc32 | two uint64: compressed size, size directory64LocLen = 20 // directory64EndLen = 56 // + extra @@ -135,6 +135,10 @@ type FileHeader struct { UncompressedSize64 uint64 Extra []byte ExternalAttrs uint32 // Meaning depends on CreatorVersion + + DescriptorCRC32 uint32 + DescriptorCompressedSize uint32 + DescriptorUncompressedSize uint32 } // FileInfo returns an fs.FileInfo for the FileHeader. @@ -199,6 +203,8 @@ type directoryEnd struct { DirectoryOffset uint64 // relative to file CommentLen uint16 Comment string + + HeaderOffset int64 // includes overall ZIP archive baseOffset } // timeZone returns a *time.Location based on the provided offset. |
