unzipFile
fun Flow<ByteArray>.unzipFile(dispatcher: CoroutineDispatcher = Dispatchers.IO): Flow<ContentfulZipEntry>
Decompresses the content from a given Flow of ByteArrays representing a ZIP file.
Return
A Flow of ContentfulZipEntry representing each entry in the ZIP file along with its data.
Example usage:
val zippedFlow: Flow<ByteArray> = ...
val unzippedEntriesFlow = zippedFlow.unzipFile()
unzippedEntriesFlow.collect { entry -> ... }
Content copied to clipboard
Parameters
dispatcher
The coroutine dispatcher to be used. Defaults to Dispatchers.IO.