forked from sheetjs/sheetjs
SheetJS
6990e66a56
- updated ssf to 0.5.4 - cleaned up CSV string output - added CSV tests (from test_files) - passes lint - inlineStr actually parses <is> block - more XLSB bits
16 lines
536 B
JavaScript
16 lines
536 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];
|
|
|
|
length = tmpbyte = data.read_shift(1);
|
|
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)) return;
|
|
}
|
|
};
|