MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / AddFromBuffer

Method AddFromBuffer

DSView/pv/ZipMaker.cpp:95–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95bool ZipMaker::AddFromBuffer(const char *innerFile, const char *buffer, unsigned int buferSize)
96{
97 assert(buffer);
98 assert(innerFile);
99 assert(m_zDoc);
100 int level = m_opt_compress_level;
101
102 if (level < Z_DEFAULT_COMPRESSION || level > Z_BEST_COMPRESSION){
103 level = Z_DEFAULT_COMPRESSION;
104 }
105
106 zipOpenNewFileInZip((zipFile)m_zDoc,innerFile,(zip_fileinfo*)m_zi,
107 NULL,0,NULL,0,NULL ,
108 Z_DEFLATED,
109 level);
110
111 zipWriteInFileInZip((zipFile)m_zDoc, buffer, (unsigned int)buferSize);
112
113 zipCloseFileInZip((zipFile)m_zDoc);
114
115 return true;
116}
117
118bool ZipMaker::AddFromFile(const char *localFile, const char *innerFile)
119{

Callers 4

save_startMethod · 0.80
save_logicMethod · 0.80
save_analogMethod · 0.80
save_dsoMethod · 0.80

Calls 3

zipOpenNewFileInZipFunction · 0.85
zipWriteInFileInZipFunction · 0.85
zipCloseFileInZipFunction · 0.85

Tested by

no test coverage detected