File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ class RBufferReader {
1818 throw new TypeError ( 'Invalid buffer type' ) ;
1919
2020 this . view = new DataView ( this . buffer ) ;
21- this . offset = 0 ;
21+ // important - offset should start from actual place in the buffer
22+ this . offset = this . byteOffset ;
2223 }
2324
2425 // Move to a specific position in the buffer
@@ -729,6 +730,8 @@ async function readHeaderFooter(tuple) {
729730 size = Number ( group . pageListLocator . size ) ,
730731 uncompressedSize = Number ( group . pageListLength ) ;
731732
733+ console . log ( 'reading in header' , offset , size )
734+
732735 return tuple . $file . readBuffer ( [ offset , size ] ) . then ( page_list_blob => {
733736 if ( ! ( page_list_blob instanceof DataView ) )
734737 throw new Error ( `Expected DataView from readBuffer, got ${ Object . prototype . toString . call ( page_list_blob ) } ` ) ;
You can’t perform that action at this time.
0 commit comments