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