• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

visgl / loaders.gl / 24139120841

08 Apr 2026 01:53PM UTC coverage: 65.319% (+30.2%) from 35.137%
24139120841

push

github

web-flow
chore: Replace puppeteer with playwright (#3350)

14216 of 18890 branches covered (75.26%)

Branch coverage included in aggregate %.

3 of 3 new or added lines in 1 file covered. (100.0%)

3248 existing lines in 369 files now uncovered.

73509 of 115413 relevant lines covered (63.69%)

5763.45 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

38.71
/modules/shapefile/src/lib/streaming/binary-reader.ts
1
// loaders.gl
1✔
UNCOV
2
// SPDX-License-Identifier: MIT
×
UNCOV
3
// Copyright (c) vis.gl contributors
×
UNCOV
4

×
UNCOV
5
export class BinaryReader {
×
UNCOV
6
  offset: number;
×
7
  arrayBuffer: ArrayBuffer;
×
UNCOV
8

×
9
  constructor(arrayBuffer: ArrayBuffer) {
1✔
10
    /** current global (stream) offset */
×
11
    this.offset = 0;
×
12
    /** current buffer from iterator */
×
13
    this.arrayBuffer = arrayBuffer;
×
14
  }
×
15
  /**
1✔
16
   * Checks if there are available bytes in data
1✔
17
   *
1✔
18
   * @param bytes
1✔
19
   * @returns boolean
1✔
20
   */
1✔
21
  hasAvailableBytes(bytes: number): boolean {
1✔
22
    return this.arrayBuffer.byteLength - this.offset >= bytes;
×
23
  }
×
UNCOV
24

×
UNCOV
25
  /**
×
UNCOV
26
   * Get the required number of bytes from the iterator
×
UNCOV
27
   *
×
UNCOV
28
   * @param bytes
×
UNCOV
29
   * @returns Dataview
×
UNCOV
30
   */
×
UNCOV
31
  getDataView(bytes: number): DataView {
×
32
    if (bytes && !this.hasAvailableBytes(bytes)) {
×
33
      throw new Error('binary data exhausted');
×
34
    }
×
35

×
36
    const dataView = bytes
×
37
      ? new DataView(this.arrayBuffer, this.offset, bytes)
×
38
      : new DataView(this.arrayBuffer, this.offset);
×
39
    this.offset += bytes;
×
40
    return dataView;
×
41
  }
×
42

1✔
43
  /**
1✔
44
   * Skipping
1✔
45
   *
1✔
46
   * @param bytes
1✔
47
   */
1✔
48
  skip(bytes: number): void {
1✔
49
    this.offset += bytes;
×
50
  }
×
51

1✔
52
  /**
1✔
53
   * Rewinding
1✔
54
   *
1✔
55
   * @param bytes
1✔
56
   */
1✔
57
  rewind(bytes: number): void {
1✔
58
    this.offset -= bytes;
×
59
  }
×
60
}
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc