MCPcopy
hub / github.com/gildas-lormeau/zip.js / HttpReader

Class HttpReader

index-native.cjs:2900–2926  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2898}
2899
2900class HttpReader extends Reader {
2901
2902 constructor(url, options = {}) {
2903 super();
2904 Object.assign(this, {
2905 url,
2906 reader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)
2907 });
2908 }
2909
2910 set size(value) {
2911 // ignored
2912 }
2913
2914 get size() {
2915 return this.reader.size;
2916 }
2917
2918 async init() {
2919 await this.reader.init();
2920 super.init();
2921 }
2922
2923 readUint8Array(index, length) {
2924 return this.reader.readUint8Array(index, length);
2925 }
2926}
2927
2928class HttpRangeReader extends HttpReader {
2929

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…