Spaces:
Sleeping
Sleeping
import { WebBlob } from './WebBlob'; | |
export async function* checkDduf(url: string): AsyncGenerator<string> { | |
const blob = await WebBlob.create(new URL(url)); | |
yield 'File size: ' + blob.size; | |
// DDUF is a zip file, uncompressed. | |
const last100kb = await blob.slice(blob.size - 100000, blob.size).arrayBuffer(); | |
const view = new DataView(last100kb); | |
let index = view.byteLength - 22; | |
} | |