Companion

object Companion

Functions

Link copied to clipboard
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.

suspend fun create(dataSource: RandomAccessDataSource, serializedZipArchiveInformation: ByteArray, chunkCacheSize: Int = DEFAULT_CACHE_SIZE): ColibrioResult<ZipResourceProvider>
fun create(dataSource: RandomAccessDataSource, serializedZipArchiveInformation: ByteArray, chunkCacheSize: Int = DEFAULT_CACHE_SIZE, onSuccess: (ZipResourceProvider) -> Unit, onError: (ColibrioException) -> Unit)

Create a new instance of ZipResourceProvider using a RandomAccessDataSource to read the ZIP archive and serialized ZipArchiveInformation in binary format describing the ZIP archive.