create

suspend fun create(dataSource: RandomAccessDataSource, zipResourceProviderOptions: ZipResourceProviderOptions = ZipResourceProviderOptions()): ColibrioResult<ZipResourceProvider>

Creates a new ZipResourceProvider using byte data provided by dataSource. The dataSource must return data from a valid ZIP file, such as an EPUB file for example.

Return

Either ColibrioResult.Success with the created ZipResourceProvider when successful, or ColibrioResult.Error containing the error.

Parameters

dataSource

A RandomAccessDataSource used for reading the ZIP archive.

zipResourceProviderOptions

options for creating the ZipResourceProvider.