Skip to content

Commit c5222b4

Browse files
committed
option "trailingSpace"
1 parent 0a357a9 commit c5222b4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

zipFile.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ module.exports = function (/*Buffer|null*/ inBuffer, /** object */ options) {
7676
endOffset = -1, // Start offset of the END header
7777
commentEnd = 0;
7878

79+
// option to search header form entire file
80+
const trailingSpace = typeof opts.trailingSpace === "boolean" ? opts.trailingSpace : false;
81+
if (trailingSpace) max = 0;
82+
7983
for (i; i >= n; i--) {
8084
if (inBuffer[i] !== 0x50) continue; // quick check that the byte is 'P'
8185
if (inBuffer.readUInt32LE(i) === Utils.Constants.ENDSIG) {

0 commit comments

Comments
 (0)