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

Function mz_zip_reader_init_file

SampleFramework12/v1.00/TinyEXR.cpp:4732–4756  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4730}
4731
4732mz_bool mz_zip_reader_init_file(mz_zip_archive *pZip, const char *pFilename,
4733 mz_uint32 flags) {
4734 mz_uint64 file_size;
4735 MZ_FILE *pFile = MZ_FOPEN(pFilename, "rb");
4736 if (!pFile)
4737 return MZ_FALSE;
4738 if (MZ_FSEEK64(pFile, 0, SEEK_END)) {
4739 MZ_FCLOSE(pFile);
4740 return MZ_FALSE;
4741 }
4742 file_size = MZ_FTELL64(pFile);
4743 if (!mz_zip_reader_init_internal(pZip, flags)) {
4744 MZ_FCLOSE(pFile);
4745 return MZ_FALSE;
4746 }
4747 pZip->m_pRead = mz_zip_file_read_func;
4748 pZip->m_pIO_opaque = pZip;
4749 pZip->m_pState->m_pFile = pFile;
4750 pZip->m_archive_size = file_size;
4751 if (!mz_zip_reader_read_central_dir(pZip, flags)) {
4752 mz_zip_reader_end(pZip);
4753 return MZ_FALSE;
4754 }
4755 return MZ_TRUE;
4756}
4757#endif // #ifndef MINIZ_NO_STDIO
4758
4759mz_uint mz_zip_reader_get_num_files(mz_zip_archive *pZip) {

Calls 3

mz_zip_reader_endFunction · 0.85

Tested by

no test coverage detected