Skip to content

Commit

Permalink
read block header support TC_BLOCKDATALONG
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Aug 19, 2014
1 parent f7c8bf1 commit 209b6e7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/input.js
Expand Up @@ -367,8 +367,15 @@ proto.defaultReadObject = function(obj) {


proto.readBlockHeader = function(len) {
// console.log(this.readBytes(2))
this.in.skip(2);
var flag = this.in.get();
if (flag === cons.TC_BLOCKDATA) {
// 0x77 size(1 byte)
this.in.skip(1);
} else if (flag === cons.TC_BLOCKDATALONG) {
// 0x7A size(4 bytes)
this.in.skip(4);
// console.log('TC_BLOCKDATALONG', this.in.getInt())
}
}


Expand Down

0 comments on commit 209b6e7

Please sign in to comment.