bit7z 4.0.0
A C++ library for interfacing with the 7-zip shared libs.
|
Abstract class representing a generic archive creator. More...
#include <bit7z/bitabstractarchivecreator.hpp>
Public Member Functions | |
void | clearPassword () noexcept |
Clear the current password used by the handler. | |
auto | compressionFormat () const noexcept -> const BitInOutFormat & |
auto | compressionLevel () const noexcept -> BitCompressionLevel |
auto | compressionMethod () const noexcept -> BitCompressionMethod |
auto | cryptHeaders () const noexcept -> bool |
auto | dictionarySize () const noexcept -> uint32_t |
auto | fileCallback () const -> FileCallback |
auto | format () const noexcept -> const BitInFormat &override |
auto | isPasswordDefined () const noexcept -> bool |
auto | library () const noexcept -> const Bit7zLibrary & |
auto | overwriteMode () const -> OverwriteMode |
auto | password () const -> tstring |
auto | passwordCallback () const -> PasswordCallback |
auto | progressCallback () const -> ProgressCallback |
auto | ratioCallback () const -> RatioCallback |
auto | retainDirectories () const noexcept -> bool |
void | setCompressionLevel (BitCompressionLevel level) noexcept |
Sets the compression level to be used when creating/updating an archive. | |
void | setCompressionMethod (BitCompressionMethod method) |
Sets the compression method to be used when creating/updating an archive. | |
void | setDictionarySize (uint32_t dictionarySize) |
Sets the dictionary size to be used when creating/updating an archive. | |
void | setFileCallback (const FileCallback &callback) |
Sets the function to be called when the current file being processed changes. | |
template<std::size_t N, typename T , typename = typename std::enable_if< !std::is_integral< T >::value >::type> | |
void | setFormatProperty (const wchar_t(&name)[N], const T &value) noexcept |
Sets a property for the output archive format as described by the 7-zip documentation (e.g., https://sevenzip.osdn.jp/chm/cmdline/switches/method.htm). | |
template<std::size_t N, typename T , typename = typename std::enable_if< std::is_integral< T >::value >::type> | |
void | setFormatProperty (const wchar_t(&name)[N], T value) noexcept |
Sets a property for the output archive format as described by the 7-zip documentation (e.g., https://sevenzip.osdn.jp/chm/cmdline/switches/method.htm). | |
void | setOverwriteMode (OverwriteMode mode) |
Sets how the handler should behave when it tries to output to an existing file or buffer. | |
void | setPassword (const tstring &password) override |
Sets up a password for the output archives. | |
void | setPassword (const tstring &password, bool cryptHeaders) |
Sets up a password for the output archive. | |
void | setPasswordCallback (const PasswordCallback &callback) |
Sets the function to be called when a password is needed to complete the ongoing operation. | |
void | setProgressCallback (const ProgressCallback &callback) |
Sets the function to be called when the processed size of the ongoing operation is updated. | |
void | setRatioCallback (const RatioCallback &callback) |
Sets the function to be called when the input processed size and current output size of the ongoing operation are known. | |
void | setRetainDirectories (bool retain) noexcept |
Sets whether the operations' output will preserve the input's directory structure or not. | |
void | setSolidMode (bool solidMode) noexcept |
Sets whether to use solid compression or not. | |
void | setStoreSymbolicLinks (bool storeSymlinks) noexcept |
Sets whether the creator will store symbolic links as links in the output archive. | |
void | setThreadsCount (uint32_t threadsCount) noexcept |
Sets the number of threads to be used when creating/updating an archive. | |
void | setTotalCallback (const TotalCallback &callback) |
Sets the function to be called when the total size of an operation is available. | |
void | setUpdateMode (bool canUpdate) |
Sets whether the creator can update existing archives or not. | |
virtual void | setUpdateMode (UpdateMode mode) |
Sets whether and how the creator can update existing archives or not. | |
void | setVolumeSize (uint64_t volumeSize) noexcept |
Sets the volumeSize (in bytes) of the output archive volumes. | |
void | setWordSize (uint32_t wordSize) |
Sets the word size to be used when creating/updating an archive. | |
auto | solidMode () const noexcept -> bool |
auto | storeSymbolicLinks () const noexcept -> bool |
auto | threadsCount () const noexcept -> uint32_t |
auto | totalCallback () const -> TotalCallback |
auto | updateMode () const noexcept -> UpdateMode |
auto | volumeSize () const noexcept -> uint64_t |
auto | wordSize () const noexcept -> uint32_t |
Abstract class representing a generic archive creator.
|
noexceptinherited |
Clear the current password used by the handler.
Calling clearPassword() will disable the encryption/decryption of archives.
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
inherited |
|
overridevirtualnoexcept |
Implements BitAbstractArchiveHandler.
|
noexceptinherited |
|
noexceptinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
noexceptinherited |
|
noexcept |
Sets the compression level to be used when creating/updating an archive.
level | the compression level desired. |
void setCompressionMethod | ( | BitCompressionMethod | method | ) |
Sets the compression method to be used when creating/updating an archive.
method | the compression method desired. |
void setDictionarySize | ( | uint32_t | dictionarySize | ) |
Sets the dictionary size to be used when creating/updating an archive.
dictionarySize | the dictionary size desired. |
|
inherited |
Sets the function to be called when the current file being processed changes.
callback | the file callback to be used. |
|
inlinenoexcept |
Sets a property for the output archive format as described by the 7-zip documentation (e.g., https://sevenzip.osdn.jp/chm/cmdline/switches/method.htm).
For example, passing the string L"tm" with a false value while creating a .7z archive will disable storing the last modified timestamps of the compressed files.
T | A non-integral type (i.e., a string). |
name | The string name of the property to be set. |
value | The value to be used for the property. |
|
inlinenoexcept |
Sets a property for the output archive format as described by the 7-zip documentation (e.g., https://sevenzip.osdn.jp/chm/cmdline/switches/method.htm).
T | An integral type (i.e., a bool or an integer type). |
name | The string name of the property to be set. |
value | The value to be used for the property. |
|
inherited |
Sets how the handler should behave when it tries to output to an existing file or buffer.
mode | the OverwriteMode to be used by the handler. |
|
overridevirtual |
Sets up a password for the output archives.
When setting a password, the produced archives will be encrypted using the default cryptographic method of the output format. The option "crypt headers" remains unchanged, in contrast with what happens when calling the setPassword(tstring, bool) method.
password | the password to be used when creating/updating archives. |
Reimplemented from BitAbstractArchiveHandler.
void setPassword | ( | const tstring & | password, |
bool | cryptHeaders | ||
) |
Sets up a password for the output archive.
When setting a password, the produced archive will be encrypted using the default cryptographic method of the output format. If the format is 7z, and the option "cryptHeaders" is set to true, the headers of the archive will be encrypted, resulting in a password request every time the output file will be opened.
password | the password to be used when creating/updating archives. |
cryptHeaders | if true, the headers of the output archives will be encrypted (valid only when using the 7z format). |
|
inherited |
Sets the function to be called when a password is needed to complete the ongoing operation.
callback | the password callback to be used. |
|
inherited |
Sets the function to be called when the processed size of the ongoing operation is updated.
static_cast<int>((100.0 * processed_size) / total_size)
.callback | the progress callback to be used. |
|
inherited |
Sets the function to be called when the input processed size and current output size of the ongoing operation are known.
static_cast<int>((100.0 * output_size) / input_size)
.callback | the ratio callback to be used. |
|
noexceptinherited |
Sets whether the operations' output will preserve the input's directory structure or not.
retain | the setting for preserving or not the input directory structure |
|
noexcept |
Sets whether to use solid compression or not.
solidMode | if true, it will be used the "solid compression" method. |
|
noexcept |
Sets whether the creator will store symbolic links as links in the output archive.
storeSymlinks | if true, symbolic links will be stored as links. |
|
noexcept |
Sets the number of threads to be used when creating/updating an archive.
threadsCount | the number of threads desired. |
|
inherited |
Sets the function to be called when the total size of an operation is available.
callback | the total callback to be used. |
void setUpdateMode | ( | bool | canUpdate | ) |
Sets whether the creator can update existing archives or not.
canUpdate | if true, compressing operations will update existing archives. |
|
virtual |
Sets whether and how the creator can update existing archives or not.
mode | the desired update mode. |
Reimplemented in BitArchiveEditor.
|
noexcept |
Sets the volumeSize (in bytes) of the output archive volumes.
volumeSize | The dimension of a volume. |
void setWordSize | ( | uint32_t | wordSize | ) |
Sets the word size to be used when creating/updating an archive.
wordSize | the word size desired. |
|
noexcept |
|
noexcept |
|
noexcept |
|
inherited |
|
noexcept |
|
noexcept |
|
noexcept |