mz_zip_writer_init_from_reader function

  1. @Native<mz_bool Function(Pointer<mz_zip_archive>, Pointer<Char>)>(ffi.Pointer<mz_zip_archive>, ffi.Pointer<ffi.Char>)>()
int mz_zip_writer_init_from_reader(
  1. Pointer<mz_zip_archive> pZip,
  2. Pointer<Char> pFilename
)

Converts a ZIP archive reader object into a writer object, to allow efficient in-place file appends to occur on an existing archive. / / For archives opened using mz_zip_reader_init_file, pFilename must be the archive's filename so it can be reopened for writing. If the file can't be reopened, mz_zip_reader_end() will be called. / / For archives opened using mz_zip_reader_init_mem, the memory block must be growable using the realloc callback (which defaults to realloc unless you've overridden it). / / Finally, for archives opened using mz_zip_reader_init, the mz_zip_archive's user provided m_pWrite function cannot be NULL. / / Note: In-place archive modification is not recommended unless you know what you're doing, because if execution stops or something goes wrong before / / the archive is finalized the file's central directory will be hosed.

Implementation

@ffi.Native<
  mz_bool Function(ffi.Pointer<mz_zip_archive>, ffi.Pointer<ffi.Char>)
>()
external int mz_zip_writer_init_from_reader(
  ffi.Pointer<mz_zip_archive> pZip,
  ffi.Pointer<ffi.Char> pFilename,
);