diff --git a/lib/reader.js b/lib/reader.js index 43e78d9d..12d4c0da 100644 --- a/lib/reader.js +++ b/lib/reader.js @@ -201,11 +201,15 @@ class ParquetEnvelopeReader { } constructor(readFn, closeFn, fileSize) { - this.read = readFn; + this.readFn = readFn; this.close = closeFn; this.fileSize = fileSize; } + async read(offset, length) { + return this.readFn(offset, length); + } + async readHeader() { let buf = await this.read(0, PARQUET_MAGIC.length);