extractFirmwareFromZip

abstract suspend fun extractFirmwareFromZip(zipFile: FirmwareArtifact, hardware: DeviceHardware, fileExtension: String, preferredFilename: String? = null): FirmwareArtifact?(source)

Extract a matching firmware binary from a previously-downloaded zip FirmwareArtifact.

Return

The extracted FirmwareArtifact, or null if no file matched or the archive is corrupt or over the extraction limits.

Parameters

zipFile

The zip archive to extract from.

hardware

Used to match the correct binary inside the zip.

fileExtension

The extension to filter for (e.g. ".bin", ".uf2").

preferredFilename

Optional exact filename to prefer within the zip.