OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::MZ_Archive Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/miniz_extension.hpp>

Inheritance diagram for Slic3r::MZ_Archive:

Public Member Functions

 MZ_Archive ()
std::string get_errorstr () const
bool is_alive () const

Static Public Member Functions

static std::string get_errorstr (mz_zip_error mz_err)

Public Attributes

mz_zip_archive arch

Detailed Description

Constructor & Destructor Documentation

◆ MZ_Archive()

Slic3r::MZ_Archive::MZ_Archive ( )
235{
236 mz_zip_zero_struct(&arch);
237}
mz_zip_archive arch
Definition miniz_extension.hpp:24

References arch.

Member Function Documentation

◆ get_errorstr() [1/2]

std::string Slic3r::MZ_Archive::get_errorstr ( ) const
inline
31 {
32 return get_errorstr(arch.m_last_error) + "!";
33 }
std::string get_errorstr() const
Definition miniz_extension.hpp:30

References arch, and get_errorstr().

Referenced by Slic3r::extract_zip_to_directory(), Slic3r::Zipper::Impl::formatted_errorstr(), get_errorstr(), and Slic3r::read_wheel_plugin_metadata().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_errorstr() [2/2]

std::string Slic3r::MZ_Archive::get_errorstr ( mz_zip_error mz_err)
static
240{
241 switch (mz_err)
242 {
243 case MZ_ZIP_NO_ERROR:
244 return "no error";
245 case MZ_ZIP_UNDEFINED_ERROR:
246 return L("undefined error");
247 case MZ_ZIP_TOO_MANY_FILES:
248 return L("too many files");
249 case MZ_ZIP_FILE_TOO_LARGE:
250 return L("File too large");
251 case MZ_ZIP_UNSUPPORTED_METHOD:
252 return L("unsupported method");
253 case MZ_ZIP_UNSUPPORTED_ENCRYPTION:
254 return L("unsupported encryption");
255 case MZ_ZIP_UNSUPPORTED_FEATURE:
256 return L("unsupported feature");
257 case MZ_ZIP_FAILED_FINDING_CENTRAL_DIR:
258 return L("failed finding central directory");
259 case MZ_ZIP_NOT_AN_ARCHIVE:
260 return L("not a ZIP archive");
261 case MZ_ZIP_INVALID_HEADER_OR_CORRUPTED:
262 return L("invalid header or corrupted");
263 case MZ_ZIP_UNSUPPORTED_MULTIDISK:
264 return L("Saving to RAID is not supported.");
265 case MZ_ZIP_DECOMPRESSION_FAILED:
266 return L("decompression failed");
267 case MZ_ZIP_COMPRESSION_FAILED:
268 return L("compression failed");
269 case MZ_ZIP_UNEXPECTED_DECOMPRESSED_SIZE:
270 return L("unexpected decompressed size");
271 case MZ_ZIP_CRC_CHECK_FAILED:
272 return L("CRC check failed");
273 case MZ_ZIP_UNSUPPORTED_CDIR_SIZE:
274 return L("unsupported central directory size");
275 case MZ_ZIP_ALLOC_FAILED:
276 return L("allocation failed");
277 case MZ_ZIP_FILE_OPEN_FAILED:
278 return L("file open failed");
279 case MZ_ZIP_FILE_CREATE_FAILED:
280 return L("file create failed");
281 case MZ_ZIP_FILE_WRITE_FAILED:
282 return L("file write failed");
283 case MZ_ZIP_FILE_READ_FAILED:
284 return L("file read failed");
285 case MZ_ZIP_FILE_CLOSE_FAILED:
286 return L("file close failed");
287 case MZ_ZIP_FILE_SEEK_FAILED:
288 return L("file seek failed");
289 case MZ_ZIP_FILE_STAT_FAILED:
290 return L("file stat failed");
291 case MZ_ZIP_INVALID_PARAMETER:
292 return L("invalid parameter");
293 case MZ_ZIP_INVALID_FILENAME:
294 return L("invalid filename");
295 case MZ_ZIP_BUF_TOO_SMALL:
296 return L("Buffer too small");
297 case MZ_ZIP_INTERNAL_ERROR:
298 return L("internal error");
299 case MZ_ZIP_FILE_NOT_FOUND:
300 return L("file not found");
301 case MZ_ZIP_ARCHIVE_TOO_LARGE:
302 return L("Archive too large");
303 case MZ_ZIP_VALIDATION_FAILED:
304 return L("validation failed");
305 case MZ_ZIP_WRITE_CALLBACK_FAILED:
306 return L("write callback failed");
307 default:
308 break;
309 }
310
311 return L("unknown error");
312}
#define L(s)
Definition ExtrusionEntity.cpp:25

References L.

Referenced by Slic3r::anonymous_namespace{ZipperArchiveImport.cpp}::read_entry(), Slic3r::anonymous_namespace{SL1.cpp}::read_ini(), Slic3r::anonymous_namespace{ZipperArchiveImport.cpp}::read_ini(), and Slic3r::anonymous_namespace{SL1.cpp}::read_png().

Here is the caller graph for this function:

◆ is_alive()

bool Slic3r::MZ_Archive::is_alive ( ) const
inline
36 {
37 return arch.m_zip_mode != MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED;
38 }

References arch.

Member Data Documentation

◆ arch


The documentation for this class was generated from the following files: