Closed kevincfz closed 4 years ago
In codec/plain_dictionary.js, we are calling: readInt8() without argument:
codec/plain_dictionary.js
readInt8()
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.
node.js
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.
In
codec/plain_dictionary.js
, we are calling:readInt8()
without argument: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.