16 lines
518 B
JavaScript
16 lines
518 B
JavaScript
for(i = 1; i < cfb.FileIndex.length; ++i) {
|
|
file = cfb.FileIndex[i];
|
|
/*:: if(!file.content) throw new Error("unreachable"); */
|
|
if(file.size >= 0x1000) {
|
|
o.l = (file.start+1) << 9;
|
|
if (has_buf && Buffer.isBuffer(file.content)) {
|
|
file.content.copy(o, o.l, 0, file.size);
|
|
// o is a 0-filled Buffer so just set next offset
|
|
o.l += (file.size + 511) & -512;
|
|
} else {
|
|
for(j = 0; j < file.size; ++j) o.write_shift(1, file.content[j]);
|
|
for(; j & 0x1FF; ++j) o.write_shift(1, 0);
|
|
}
|
|
}
|
|
}
|