         dataOffset += Int(self.localFileHeader.extraFieldLength)
         return dataOffset
     }
+    var size: Int {
+        let centralDirectoryStructure = self.centralDirectoryStructure
+        let localFileHeader = self.localFileHeader
+        var extraDataLength = Int(localFileHeader.fileNameLength)
+        extraDataLength += Int(localFileHeader.extraFieldLength)
+        var size = LocalFileHeader.size + extraDataLength
+        let isCompressed = centralDirectoryStructure.compressionMethod != CompressionMethod.none.rawValue
+        size += isCompressed ? self.compressedSize : self.uncompressedSize
+        size += centralDirectoryStructure.usesDataDescriptor ? DataDescriptor.size : 0
+        return size
+    }
     let centralDirectoryStructure: CentralDirectoryStructure
     let localFileHeader: LocalFileHeader
     let dataDescriptor: DataDescriptor?

        self.fileNameLength = data.scanValue(start: 26)
        self.extraFieldLength = data.scanValue(start: 28)
        let additionalDataLength = Int(self.fileNameLength + self.extraFieldLength)
        guard let additionalData = try? provider(additionalDataLength) else {
            return nil
        }
        guard additionalData.count == additionalDataLength else { return nil }
        var subRangeStart = 0
        var subRangeEnd = Int(self.fileNameLength)

    init?(centralDirectoryStructure: CentralDirectoryStructure,
          localFileHeader: LocalFileHeader,
          dataDescriptor: DataDescriptor?) {
        // We currently don't support ZIP64 or encrypted archives
        guard !centralDirectoryStructure.isZIP64 else { return nil }
        guard !centralDirectoryStructure.isEncrypted else { return nil }
        self.centralDirectoryStructure = centralDirectoryStructure
