ironSource / parquetjs

fully asynchronous, pure JavaScript implementation of the Parquet file format
MIT License
345 stars 173 forks source link

Add 0 argument to readInt8() in plain_dictionary codec function #98

Closed kevincfz closed 4 years ago

kevincfz commented 4 years ago

In codec/plain_dictionary.js, we are calling: readInt8() without argument:

opts.bitWidth = cursor.buffer.slice(cursor.offset, cursor.offset+1).readInt8();

This is fine for node.js, because the method has a default argument. See https://github.com/nodejs/node/blob/master/lib/internal/buffer.js#L411.

But when using this package in browser, it breaks, because the buffer method does not have such a default argument. For example: https://github.com/feross/buffer/blob/master/index.js#L1221

Accepting this change will make this package compatible to use in browser.