mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-19 06:41:14 -06:00
Add the full source of BambuStudio
using version 1.0.10
This commit is contained in:
parent
30bcadab3e
commit
1555904bef
3771 changed files with 1251328 additions and 0 deletions
35
src/libslic3r/miniz_extension.hpp
Normal file
35
src/libslic3r/miniz_extension.hpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
#ifndef MINIZ_EXTENSION_HPP
|
||||
#define MINIZ_EXTENSION_HPP
|
||||
|
||||
#include <string>
|
||||
#include <miniz.h>
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
bool open_zip_reader(mz_zip_archive *zip, const std::string &fname_utf8);
|
||||
bool open_zip_writer(mz_zip_archive *zip, const std::string &fname_utf8);
|
||||
bool close_zip_reader(mz_zip_archive *zip);
|
||||
bool close_zip_writer(mz_zip_archive *zip);
|
||||
|
||||
class MZ_Archive {
|
||||
public:
|
||||
mz_zip_archive arch;
|
||||
|
||||
MZ_Archive();
|
||||
|
||||
static std::string get_errorstr(mz_zip_error mz_err);
|
||||
|
||||
std::string get_errorstr() const
|
||||
{
|
||||
return get_errorstr(arch.m_last_error) + "!";
|
||||
}
|
||||
|
||||
bool is_alive() const
|
||||
{
|
||||
return arch.m_zip_mode != MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
#endif // MINIZ_EXTENSION_HPP
|
Loading…
Add table
Add a link
Reference in a new issue