MCPcopy Index your code
hub / github.com/ColmapView/Colmapview.github.io / readResponseToBlob

Function readResponseToBlob

src/utils/urlUtils.ts:140–149  ·  view source on GitHub ↗
(
  response: Response,
  onProgress?: DownloadProgressCallback
)

Source from the content-addressed store, hash-verified

138 * downloads so both can drive the byte counter in the loading overlay.
139 */
140export async function readResponseToBlob(
141 response: Response,
142 onProgress?: DownloadProgressCallback
143): Promise<Blob> {
144 if (!onProgress || !response.body) {
145 return response.blob();
146 }
147 const total = parseSafeIntegerString(response.headers.get('content-length') ?? '') ?? 0;
148 return readResponseStreamToBlob(response.body, total, onProgress);
149}
150
151/**
152 * Read a fetch response body to a Blob, reporting bytes as they arrive. Builds

Callers 2

fetchManifestFileFunction · 0.90
fetchRemoteSplatFileFunction · 0.85

Calls 4

parseSafeIntegerStringFunction · 0.90
readResponseStreamToBlobFunction · 0.85
blobMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected