ZipWriter

object ZipWriter

ZIP writer for STORE and DEFLATE entries, with ZIP64 where it is needed. The whole archive is built in memory and returned as a ByteArray; there is no streaming form. ZIP64 records are emitted only when the entry count passes 65535 or a size or offset overflows 32 bits, with per-entry ZIP64 extra fields for oversized entries, so ordinary archives stay classic and small.

This is the only writer in the library, and it is not reachable from the KiteArchive object.

Types

Link copied to clipboard
data class FileSpec(val name: String, val data: ByteArray, val codec: CodecId = CodecId.DEFLATE)

One file to add: its archive name, raw data, and compression codec.

Functions

Link copied to clipboard