MeshLib C Docs
Loading...
Searching...
No Matches
MRZip.h File Reference
#include <MRCMisc/common.h>
#include <MRCMisc/exports.h>
#include <stddef.h>

Go to the source code of this file.

Typedefs

typedef struct MR_CompressZipSettings MR_CompressZipSettings

Functions

MRC_API MR_expected_void_std_stringMR_decompressZip_std_filesystem_path (const char *zipFile, const char *zipFile_end, const char *targetFolder, const char *targetFolder_end, const char *password)
 decompresses given zip-file into given folder
MRC_API MR_expected_void_std_stringMR_decompressZip_std_istream (MR_std_istream *zipStream, const char *targetFolder, const char *targetFolder_end, const char *password)
 decompresses given binary stream (containing the data of a zip file only) into given folder
MRC_API const MR_std_vector_std_filesystem_pathMR_CompressZipSettings_Get_excludeFiles (const MR_CompressZipSettings *_this)
MRC_API void MR_CompressZipSettings_Set_excludeFiles (MR_CompressZipSettings *_this, MR_PassBy value_pass_by, MR_std_vector_std_filesystem_path *value)
MRC_API MR_std_vector_std_filesystem_pathMR_CompressZipSettings_GetMutable_excludeFiles (MR_CompressZipSettings *_this)
MRC_API const int * MR_CompressZipSettings_Get_compressionLevel (const MR_CompressZipSettings *_this)
MRC_API void MR_CompressZipSettings_Set_compressionLevel (MR_CompressZipSettings *_this, int value)
MRC_API int * MR_CompressZipSettings_GetMutable_compressionLevel (MR_CompressZipSettings *_this)
MRC_API const MR_std_stringMR_CompressZipSettings_Get_password (const MR_CompressZipSettings *_this)
MRC_API void MR_CompressZipSettings_Set_password (MR_CompressZipSettings *_this, const char *value, const char *value_end)
MRC_API MR_std_stringMR_CompressZipSettings_GetMutable_password (MR_CompressZipSettings *_this)
MRC_API const MR_std_function_bool_from_floatMR_CompressZipSettings_Get_cb (const MR_CompressZipSettings *_this)
MRC_API void MR_CompressZipSettings_Set_cb (MR_CompressZipSettings *_this, MR_PassBy value_pass_by, MR_std_function_bool_from_float *value)
MRC_API MR_std_function_bool_from_floatMR_CompressZipSettings_GetMutable_cb (MR_CompressZipSettings *_this)
MRC_API MR_CompressZipSettingsMR_CompressZipSettings_DefaultConstruct (void)
MRC_API MR_CompressZipSettingsMR_CompressZipSettings_DefaultConstructArray (size_t num_elems)
MRC_API MR_CompressZipSettingsMR_CompressZipSettings_ConstructFrom (MR_PassBy excludeFiles_pass_by, MR_std_vector_std_filesystem_path *excludeFiles, int compressionLevel, const char *password, const char *password_end, MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb)
MRC_API const MR_CompressZipSettingsMR_CompressZipSettings_OffsetPtr (const MR_CompressZipSettings *ptr, ptrdiff_t i)
MRC_API MR_CompressZipSettingsMR_CompressZipSettings_OffsetMutablePtr (MR_CompressZipSettings *ptr, ptrdiff_t i)
MRC_API MR_CompressZipSettingsMR_CompressZipSettings_ConstructFromAnother (MR_PassBy _other_pass_by, MR_CompressZipSettings *_other)
MRC_API void MR_CompressZipSettings_Destroy (const MR_CompressZipSettings *_this)
 Destroys a heap-allocated instance of MR_CompressZipSettings. Does nothing if the pointer is null.
MRC_API void MR_CompressZipSettings_DestroyArray (const MR_CompressZipSettings *_this)
 Destroys a heap-allocated array of MR_CompressZipSettings. Does nothing if the pointer is null.
MRC_API MR_CompressZipSettingsMR_CompressZipSettings_AssignFromAnother (MR_CompressZipSettings *_this, MR_PassBy _other_pass_by, MR_CompressZipSettings *_other)
MRC_API MR_expected_void_std_stringMR_compressZip_3 (const char *zipFile, const char *zipFile_end, const char *sourceFolder, const char *sourceFolder_end, const MR_CompressZipSettings *settings)
 compresses given folder in given zip-file
MRC_API MR_expected_void_std_stringMR_compressZip_5 (const char *zipFile, const char *zipFile_end, const char *sourceFolder, const char *sourceFolder_end, const MR_std_vector_std_filesystem_path *excludeFiles, const char *password, MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb)
 compresses given folder in given zip-file

Typedef Documentation

◆ MR_CompressZipSettings

Generated from class MR::CompressZipSettings. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

Function Documentation

◆ MR_compressZip_3()

MRC_API MR_expected_void_std_string * MR_compressZip_3 ( const char * zipFile,
const char * zipFile_end,
const char * sourceFolder,
const char * sourceFolder_end,
const MR_CompressZipSettings * settings )

compresses given folder in given zip-file

Generated from function MR::compressZip. Parameter zipFile is a UTF-8 encoded filesystem path. Parameter sourceFolder is a UTF-8 encoded filesystem path. Parameter settings is a single object. Parameter settings has a default argument: {}, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_expected_void_std_string_Destroy() to free it when you're done using it.

◆ MR_compressZip_5()

MRC_API MR_expected_void_std_string * MR_compressZip_5 ( const char * zipFile,
const char * zipFile_end,
const char * sourceFolder,
const char * sourceFolder_end,
const MR_std_vector_std_filesystem_path * excludeFiles,
const char * password,
MR_PassBy cb_pass_by,
MR_std_function_bool_from_float * cb )

compresses given folder in given zip-file

Parameters
excludeFilesfiles that should not be included to result zip
passwordif password is given then the archive will be encrypted
cban option to get progress notifications and cancel the operation Generated from function MR::compressZip. Parameter zipFile is a UTF-8 encoded filesystem path. Parameter sourceFolder is a UTF-8 encoded filesystem path. Parameter excludeFiles can not be null. It is a single object. Parameter password defaults to a null pointer in C++. Parameter cb has a default argument: {}, pass MR_PassBy_DefaultArgument and a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_expected_void_std_string_Destroy() to free it when you're done using it.

◆ MR_CompressZipSettings_AssignFromAnother()

MRC_API MR_CompressZipSettings * MR_CompressZipSettings_AssignFromAnother ( MR_CompressZipSettings * _this,
MR_PassBy _other_pass_by,
MR_CompressZipSettings * _other )

Generated from method MR::CompressZipSettings::operator=. Parameter _this can not be null. It is a single object. The reference to things referred to by the parameter _other (if any) might be preserved in this object. The returned pointer will never be null. It is non-owning, do NOT destroy it. When this function is called, this object will drop any object references it held previously.

◆ MR_CompressZipSettings_ConstructFrom()

MRC_API MR_CompressZipSettings * MR_CompressZipSettings_ConstructFrom ( MR_PassBy excludeFiles_pass_by,
MR_std_vector_std_filesystem_path * excludeFiles,
int compressionLevel,
const char * password,
const char * password_end,
MR_PassBy cb_pass_by,
MR_std_function_bool_from_float * cb )

Constructs MR::CompressZipSettings elementwise. The reference to the parameter excludeFiles might be preserved in the constructed object. Parameter password can not be null. If password_end is null, then password is assumed to be null-terminated. The reference to the parameter password might be preserved in the constructed object. The reference to the parameter cb might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_CompressZipSettings_Destroy() to free it when you're done using it. When this function is called, this object will drop any object references it held previously.

◆ MR_CompressZipSettings_ConstructFromAnother()

MRC_API MR_CompressZipSettings * MR_CompressZipSettings_ConstructFromAnother ( MR_PassBy _other_pass_by,
MR_CompressZipSettings * _other )

Generated from constructor MR::CompressZipSettings::CompressZipSettings. The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_CompressZipSettings_Destroy() to free it when you're done using it.

◆ MR_CompressZipSettings_DefaultConstruct()

MRC_API MR_CompressZipSettings * MR_CompressZipSettings_DefaultConstruct ( void )

Constructs an empty (default-constructed) instance. Never returns null. Returns an instance allocated on the heap! Must call MR_CompressZipSettings_Destroy() to free it when you're done using it.

◆ MR_CompressZipSettings_DefaultConstructArray()

MRC_API MR_CompressZipSettings * MR_CompressZipSettings_DefaultConstructArray ( size_t num_elems)

Constructs an array of empty (default-constructed) instances, of the specified size. Will never return null. The array must be destroyed using MR_CompressZipSettings_DestroyArray(). Use MR_CompressZipSettings_OffsetMutablePtr() and MR_CompressZipSettings_OffsetPtr() to access the array elements.

◆ MR_CompressZipSettings_Destroy()

MRC_API void MR_CompressZipSettings_Destroy ( const MR_CompressZipSettings * _this)

Destroys a heap-allocated instance of MR_CompressZipSettings. Does nothing if the pointer is null.

◆ MR_CompressZipSettings_DestroyArray()

MRC_API void MR_CompressZipSettings_DestroyArray ( const MR_CompressZipSettings * _this)

Destroys a heap-allocated array of MR_CompressZipSettings. Does nothing if the pointer is null.

◆ MR_CompressZipSettings_Get_cb()

MRC_API const MR_std_function_bool_from_float * MR_CompressZipSettings_Get_cb ( const MR_CompressZipSettings * _this)

an option to get progress notifications and cancel the operation Returns a pointer to a member variable of class MR::CompressZipSettings named cb. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it. The reference to this object might be preserved as the return value.

◆ MR_CompressZipSettings_Get_compressionLevel()

MRC_API const int * MR_CompressZipSettings_Get_compressionLevel ( const MR_CompressZipSettings * _this)

[0-9]: greater level means longer processing but better compression 0 is special value to use default level Returns a pointer to a member variable of class MR::CompressZipSettings named compressionLevel. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it. The reference to this object might be preserved as the return value.

◆ MR_CompressZipSettings_Get_excludeFiles()

MRC_API const MR_std_vector_std_filesystem_path * MR_CompressZipSettings_Get_excludeFiles ( const MR_CompressZipSettings * _this)

files that should not be included to result zip Returns a pointer to a member variable of class MR::CompressZipSettings named excludeFiles. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it. The reference to this object might be preserved as the return value.

◆ MR_CompressZipSettings_Get_password()

MRC_API const MR_std_string * MR_CompressZipSettings_Get_password ( const MR_CompressZipSettings * _this)

if password is given then the archive will be encrypted Returns a pointer to a member variable of class MR::CompressZipSettings named password. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it. The reference to this object might be preserved as the return value.

◆ MR_CompressZipSettings_GetMutable_cb()

MRC_API MR_std_function_bool_from_float * MR_CompressZipSettings_GetMutable_cb ( MR_CompressZipSettings * _this)

an option to get progress notifications and cancel the operation Returns a mutable pointer to a member variable of class MR::CompressZipSettings named cb. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it. The reference to this object might be preserved as the return value.

◆ MR_CompressZipSettings_GetMutable_compressionLevel()

MRC_API int * MR_CompressZipSettings_GetMutable_compressionLevel ( MR_CompressZipSettings * _this)

[0-9]: greater level means longer processing but better compression 0 is special value to use default level Returns a mutable pointer to a member variable of class MR::CompressZipSettings named compressionLevel. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it. The reference to this object might be preserved as the return value.

◆ MR_CompressZipSettings_GetMutable_excludeFiles()

MRC_API MR_std_vector_std_filesystem_path * MR_CompressZipSettings_GetMutable_excludeFiles ( MR_CompressZipSettings * _this)

files that should not be included to result zip Returns a mutable pointer to a member variable of class MR::CompressZipSettings named excludeFiles. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it. The reference to this object might be preserved as the return value.

◆ MR_CompressZipSettings_GetMutable_password()

MRC_API MR_std_string * MR_CompressZipSettings_GetMutable_password ( MR_CompressZipSettings * _this)

if password is given then the archive will be encrypted Returns a mutable pointer to a member variable of class MR::CompressZipSettings named password. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it. The reference to this object might be preserved as the return value.

◆ MR_CompressZipSettings_OffsetMutablePtr()

MRC_API MR_CompressZipSettings * MR_CompressZipSettings_OffsetMutablePtr ( MR_CompressZipSettings * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element. The reference to the parameter ptr might be preserved in the return value.

◆ MR_CompressZipSettings_OffsetPtr()

MRC_API const MR_CompressZipSettings * MR_CompressZipSettings_OffsetPtr ( const MR_CompressZipSettings * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element. The reference to the parameter ptr might be preserved in the return value.

◆ MR_CompressZipSettings_Set_cb()

MRC_API void MR_CompressZipSettings_Set_cb ( MR_CompressZipSettings * _this,
MR_PassBy value_pass_by,
MR_std_function_bool_from_float * value )

an option to get progress notifications and cancel the operation Modifies a member variable of class MR::CompressZipSettings named cb. Parameter _this can not be null. It is a single object. The reference to the parameter value might be preserved in this object in element cb. When this function is called, this object will drop object references it held previously in cb.

◆ MR_CompressZipSettings_Set_compressionLevel()

MRC_API void MR_CompressZipSettings_Set_compressionLevel ( MR_CompressZipSettings * _this,
int value )

[0-9]: greater level means longer processing but better compression 0 is special value to use default level Modifies a member variable of class MR::CompressZipSettings named compressionLevel. Parameter _this can not be null. It is a single object. When this function is called, this object will drop object references it held previously in compressionLevel.

◆ MR_CompressZipSettings_Set_excludeFiles()

MRC_API void MR_CompressZipSettings_Set_excludeFiles ( MR_CompressZipSettings * _this,
MR_PassBy value_pass_by,
MR_std_vector_std_filesystem_path * value )

files that should not be included to result zip Modifies a member variable of class MR::CompressZipSettings named excludeFiles. Parameter _this can not be null. It is a single object. The reference to the parameter value might be preserved in this object in element excludeFiles. When this function is called, this object will drop object references it held previously in excludeFiles.

◆ MR_CompressZipSettings_Set_password()

MRC_API void MR_CompressZipSettings_Set_password ( MR_CompressZipSettings * _this,
const char * value,
const char * value_end )

if password is given then the archive will be encrypted Modifies a member variable of class MR::CompressZipSettings named password. Parameter _this can not be null. It is a single object. Parameter value can not be null. If value_end is null, then value is assumed to be null-terminated. The reference to the parameter value might be preserved in this object in element password. When this function is called, this object will drop object references it held previously in password.

◆ MR_decompressZip_std_filesystem_path()

MRC_API MR_expected_void_std_string * MR_decompressZip_std_filesystem_path ( const char * zipFile,
const char * zipFile_end,
const char * targetFolder,
const char * targetFolder_end,
const char * password )

decompresses given zip-file into given folder

Parameters
passwordif password is given then it will be used to decipher encrypted archive Generated from function MR::decompressZip. Parameter zipFile is a UTF-8 encoded filesystem path. Parameter targetFolder is a UTF-8 encoded filesystem path. Parameter password defaults to a null pointer in C++. Never returns null. Returns an instance allocated on the heap! Must call MR_expected_void_std_string_Destroy() to free it when you're done using it.

◆ MR_decompressZip_std_istream()

MRC_API MR_expected_void_std_string * MR_decompressZip_std_istream ( MR_std_istream * zipStream,
const char * targetFolder,
const char * targetFolder_end,
const char * password )

decompresses given binary stream (containing the data of a zip file only) into given folder

Parameters
passwordif password is given then it will be used to decipher encrypted archive Generated from function MR::decompressZip. Parameter zipStream can not be null. It is a single object. Parameter targetFolder is a UTF-8 encoded filesystem path. Parameter password defaults to a null pointer in C++. Never returns null. Returns an instance allocated on the heap! Must call MR_expected_void_std_string_Destroy() to free it when you're done using it.