mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Reduce usage of the arrayByteLength
helper function
We're using this helper function when reading data from the [`PDFWorkerStreamReader.read`](a49d1d1615/src/core/worker_stream.js (L90-L98)
) and [`PDFWorkerStreamRangeReader.read`](a49d1d1615/src/core/worker_stream.js (L122-L128)
) methods, and as can be seen they always return `ArrayBuffer` data. Hence we can simply get the `byteLength` directly, and don't need to use the helper function. Note that at the time when `arrayByteLength` was added we still supported browsers without TypedArray functionality, and we'd then simulate them using regular Arrays.
This commit is contained in:
parent
323d3d246a
commit
96d338e437
3 changed files with 24 additions and 7 deletions
|
@ -1115,7 +1115,6 @@ export {
|
|||
AnnotationReviewState,
|
||||
AnnotationStateModelType,
|
||||
AnnotationType,
|
||||
arrayByteLength,
|
||||
arraysToBytes,
|
||||
assert,
|
||||
BaseException,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue