forked from sheetjs/sheetjs
SheetJS
7e9f218f0f
- cellHTML controls HTML generation - cellFormula controls formula output - sheetStubs now defaults to false - cleaned up unnecessary CSV quotes (fixed #45) - updated test_files to 20140211 - updated SSF to 0.5.7 - removed unused main function - removed some dead code
16 lines
557 B
JavaScript
16 lines
557 B
JavaScript
/* [MS-XLSB] 2.1.4 Record */
|
|
var recordhopper = function(data, cb) {
|
|
var tmpbyte, cntbyte, length;
|
|
prep_blob(data, data.l || 0);
|
|
while(data.l < data.length) {
|
|
var RT = data.read_shift(1);
|
|
if(RT & 0x80) RT = (RT & 0x7F) + ((data.read_shift(1) & 0x7F)<<7);
|
|
var R = RecordEnum[RT] || RecordEnum[0xFFFF];
|
|
tmpbyte = data.read_shift(1);
|
|
length = tmpbyte & 0x7F;
|
|
for(cntbyte = 1; cntbyte <4 && (tmpbyte & 0x80); ++cntbyte) length += ((tmpbyte = data.read_shift(1)) & 0x7F)<<(7*cntbyte);
|
|
var d = R.f(data, length);
|
|
if(cb(d, R, RT)) return;
|
|
}
|
|
};
|