(directory, dataView, offset)
| 3951 | }; |
| 3952 | |
| 3953 | function readCommonHeader(directory, dataView, offset) { |
| 3954 | const rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2); |
| 3955 | const encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED; |
| 3956 | const rawLastModDate = getUint32(dataView, offset + 6); |
| 3957 | Object.assign(directory, { |
| 3958 | encrypted, |
| 3959 | version: getUint16(dataView, offset), |
| 3960 | bitFlag: { |
| 3961 | level: (rawBitFlag & BITFLAG_LEVEL) >> 1, |
| 3962 | dataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR, |
| 3963 | languageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG |
| 3964 | }, |
| 3965 | rawLastModDate, |
| 3966 | lastModDate: getDate(rawLastModDate), |
| 3967 | filenameLength: getUint16(dataView, offset + 22), |
| 3968 | extraFieldLength: getUint16(dataView, offset + 24) |
| 3969 | }); |
| 3970 | } |
| 3971 | |
| 3972 | function readCommonFooter(fileEntry, directory, dataView, offset, localDirectory) { |
| 3973 | const { rawExtraField } = directory; |
no test coverage detected
searching dependent graphs…