2014-01-28 16:38:02 +00:00
|
|
|
/* [MS-XLSB] 2.1.4 Record */
|
|
|
|
var recordhopper = function(data, cb) {
|
2014-01-29 06:00:09 +00:00
|
|
|
var tmpbyte, cntbyte, length;
|
2014-01-28 16:38:02 +00:00
|
|
|
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];
|
2014-02-12 06:09:42 +00:00
|
|
|
tmpbyte = data.read_shift(1);
|
|
|
|
length = tmpbyte & 0x7F;
|
2014-01-28 16:38:02 +00:00
|
|
|
for(cntbyte = 1; cntbyte <4 && (tmpbyte & 0x80); ++cntbyte) length += ((tmpbyte = data.read_shift(1)) & 0x7F)<<(7*cntbyte);
|
|
|
|
var d = R.f(data, length);
|
2014-01-31 11:52:18 +00:00
|
|
|
if(cb(d, R, RT)) return;
|
2014-01-28 16:38:02 +00:00
|
|
|
}
|
|
|
|
};
|