PhosKinTime-Vis TypeScript API
PhosKinTime-Vis TypeScript API / sources/zip / BundleZipSource
Class: BundleZipSource¶
Defined in: src/lib/sources/zip.ts:12
A <run>.pkt.zip bundle. The central directory is read when the archive is opened (a damaged
archive is refused then); each file is inflated the first time it is read, by fflate's
asynchronous unzip (in a worker where the platform has workers), and kept in memory. Opening
therefore costs only the directory, and inflating (≈ 130 ms for the network fixture) no longer
runs on the main thread.
Implements¶
Constructors¶
Constructor¶
new BundleZipSource(
label,bytes):BundleZipSource
Defined in: src/lib/sources/zip.ts:18
Parameters¶
label¶
string
bytes¶
Uint8Array
Returns¶
BundleZipSource
Properties¶
kind¶
readonlykind:"zip"
Defined in: src/lib/sources/zip.ts:13
Implementation of¶
label¶
readonlylabel:string
Defined in: src/lib/sources/zip.ts:18
Human-readable origin (folder or file name).
Implementation of¶
Methods¶
list()¶
list():
string[]
Defined in: src/lib/sources/zip.ts:56
Paths relative to the bundle root (the folder that holds manifest.json).
Returns¶
string[]
Implementation of¶
read()¶
read(
path):Promise\<ArrayBuffer>
Defined in: src/lib/sources/zip.ts:60
Parameters¶
path¶
string
Returns¶
Promise\<ArrayBuffer>
Implementation of¶
fromFile()¶
staticfromFile(f):Promise\<BundleZipSource>
Defined in: src/lib/sources/zip.ts:52
Parameters¶
f¶
File
Returns¶
Promise\<BundleZipSource>