MCPcopy Create free account
hub / github.com/GoogleChrome/samples / LazyUint8Array

Function LazyUint8Array

mkbitmap/mkbitmap.js:3133–3136  ·  view source on GitHub ↗

@constructor

()

Source from the content-addressed store, hash-verified

3131 // Lazy chunked Uint8Array (implements get and length from Uint8Array). Actual getting is abstracted away for eventual reuse.
3132 /** @constructor */
3133 function LazyUint8Array() {
3134 this.lengthKnown = false;
3135 this.chunks = []; // Loaded chunks. Index is the chunk number
3136 }
3137 LazyUint8Array.prototype.get = /** @this{Object} */ function LazyUint8Array_get(idx) {
3138 if (idx > this.length-1 || idx < 0) {
3139 return undefined;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected