MCPcopy Create free account
hub / github.com/TheRealMJP/DeferredTexturing / mz_zip_reader_init_mem

Function mz_zip_reader_init_mem

SampleFramework12/v1.00/TinyEXR.cpp:4700–4718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4698}
4699
4700mz_bool mz_zip_reader_init_mem(mz_zip_archive *pZip, const void *pMem,
4701 size_t size, mz_uint32 flags) {
4702 if (!mz_zip_reader_init_internal(pZip, flags))
4703 return MZ_FALSE;
4704 pZip->m_archive_size = size;
4705 pZip->m_pRead = mz_zip_mem_read_func;
4706 pZip->m_pIO_opaque = pZip;
4707#ifdef __cplusplus
4708 pZip->m_pState->m_pMem = const_cast<void *>(pMem);
4709#else
4710 pZip->m_pState->m_pMem = (void *)pMem;
4711#endif
4712 pZip->m_pState->m_mem_size = size;
4713 if (!mz_zip_reader_read_central_dir(pZip, flags)) {
4714 mz_zip_reader_end(pZip);
4715 return MZ_FALSE;
4716 }
4717 return MZ_TRUE;
4718}
4719
4720#ifndef MINIZ_NO_STDIO
4721static size_t mz_zip_file_read_func(void *pOpaque, mz_uint64 file_ofs,

Callers

nothing calls this directly

Calls 3

mz_zip_reader_endFunction · 0.85

Tested by

no test coverage detected