Skip to content
Oz edited this page May 22, 2024 · 16 revisions

The main namespace of the bit7z library.

Types

Name
enum class BitCompressionLevel { None, Fastest, Fast, Normal, Max, Ultra }
enum class BitCompressionMethod { Copy, Deflate, Deflate64, BZip2, Lzma, Lzma2, Ppmd }
enum class BitError { Fail, FilterNotSpecified, FormatFeatureNotSupported, IndicesNotSpecified, InvalidArchivePath, InvalidOutputBufferSize, InvalidCompressionMethod, InvalidDictionarySize, InvalidIndex, InvalidWordSize, ItemIsAFolder, ItemMarkedAsDeleted, NoMatchingItems, NoMatchingSignature, NonEmptyOutputBuffer, NullOutputBuffer, RequestedWrongVariantType, UnsupportedOperation, UnsupportedVariantType, WrongUpdateMode, InvalidZipPassword }
enum class BitFailureSource { CRCError, DataAfterEnd, DataError, InvalidArchive, InvalidArgument, FormatDetectionError, HeadersError, NoSuchItem, OperationNotSupported, OperationNotPermitted, UnavailableData, UnexpectedEnd, WrongPassword }
enum class BitProperty { NoProperty, MainSubfile, HandlerItemIndex, Path, Name, Extension, IsDir, Size, PackSize, Attrib, CTime, ATime, MTime, Solid, Commented, Encrypted, SplitBefore, SplitAfter, DictionarySize, CRC, Type, IsAnti, Method, HostOS, FileSystem, User, Group, Block, Comment, Position, Prefix, NumSubDirs, NumSubFiles, UnpackVer, Volume, IsVolume, Offset, Links, NumBlocks, NumVolumes, TimeType, Bit64, BigEndian, Cpu, PhySize, HeadersSize, Checksum, Characts, Va, Id, ShortName, CreatorApp, SectorSize, PosixAttrib, SymLink, Error, TotalSize, FreeSpace, ClusterSize, VolumeName, LocalName, Provider, NtSecure, IsAltStream, IsAux, IsDeleted, IsTree, Sha1, Sha256, ErrorType, NumErrors, ErrorFlags, WarningFlags, Warning, NumStreams, NumAltStreams, AltStreamsSize, VirtualSize, UnpackSize, TotalPhySize, VolumeIndex, SubType, ShortComment, CodePage, IsNotArcType, PhySizeCantBeDetected, ZerosTailIsAllowed, TailSize, EmbeddedStubSize, NtReparse, HardLink, INode, StreamId, ReadOnly, OutName, CopyLink }
enum class BitPropVariantType { Empty, Bool, String, UInt8, UInt16, UInt32, UInt64, Int8, Int16, Int32, Int64, FileTime }
enum class FilterPolicy { Include, Exclude }
enum class FormatFeatures { MultipleFiles, SolidArchive, CompressionLevel, Encryption, HeaderEncryption, MultipleMethods }
enum class OverwriteMode { None, Overwrite, Skip }
enum class UpdateMode { None, Append, Update, Overwrite }
typedef byte_t
typedef FileCallback
typedef native_string
typedef PasswordCallback
typedef ProgressCallback
typedef RatioCallback
typedef tchar
typedef time_type
typedef TotalCallback
typedef tregex
typedef tstring

Types Documentation

enum class BitCompressionLevel

The BitCompressionLevel enum represents the compression level used by 7z when creating archives.

Note

It uses the same values used by 7-zip.

Constant Value Description
None 0 Copy mode (no compression)
Fastest 1 Fastest compressing.
Fast 3 Fast compressing.
Normal 5 Normal compressing.
Max 7 Maximum compressing.
Ultra 9 Ultra compressing.
#include <bit7z/bitcompressionlevel.hpp>

enum class BitCompressionMethod

The BitCompressionMethod enum represents the compression methods used by 7z when creating archives.

Constant Value Description
Copy 0
Deflate 1
Deflate64 2
BZip2 3
Lzma 4
Lzma2 5
Ppmd 6
#include <bit7z/bitcompressionmethod.hpp>

enum class BitError

The BitError enum struct values represent bit7z specific errors.

Constant Value Description
Fail 1
FilterNotSpecified 1
FormatFeatureNotSupported 2
IndicesNotSpecified 3
InvalidArchivePath 4
InvalidOutputBufferSize 5
InvalidCompressionMethod 6
InvalidDictionarySize 7
InvalidIndex 8
InvalidWordSize 9
ItemIsAFolder 10
ItemMarkedAsDeleted 11
NoMatchingItems 12
NoMatchingSignature 13
NonEmptyOutputBuffer 14
NullOutputBuffer 15
RequestedWrongVariantType 16
UnsupportedOperation 17
UnsupportedVariantType 18
WrongUpdateMode 19
InvalidZipPassword 20
#include <bit7z/biterror.hpp>

enum class BitFailureSource

The BitFailureSource enum struct values represent bit7z error conditions.

They can be used for performing queries on bit7z's error_codes, for the purpose of grouping, classification, or error translation.

Constant Value Description
CRCError 0
DataAfterEnd 1
DataError 2
InvalidArchive 3
InvalidArgument 4
FormatDetectionError 5
HeadersError 6
NoSuchItem 7
OperationNotSupported 8
OperationNotPermitted 9
UnavailableData 10
UnexpectedEnd 11
WrongPassword 12
#include <bit7z/biterror.hpp>

enum class BitProperty

The BitProperty enum represents the archive/item properties that 7-zip can read or write.

Constant Value Description
NoProperty 0
MainSubfile 1
HandlerItemIndex 2
Path 3
Name 4
Extension 5
IsDir 6
Size 7
PackSize 8
Attrib 9
CTime 10
ATime 11
MTime 12
Solid 13
Commented 14
Encrypted 15
SplitBefore 16
SplitAfter 17
DictionarySize 18
CRC 19
Type 20
IsAnti 21
Method 22
HostOS 23
FileSystem 24
User 25
Group 26
Block 27
Comment 28
Position 29
Prefix 30
NumSubDirs 31
NumSubFiles 32
UnpackVer 33
Volume 34
IsVolume 35
Offset 36
Links 37
NumBlocks 38
NumVolumes 39
TimeType 40
Bit64 41
BigEndian 42
Cpu 43
PhySize 44
HeadersSize 45
Checksum 46
Characts 47
Va 48
Id 49
ShortName 50
CreatorApp 51
SectorSize 52
PosixAttrib 53
SymLink 54
Error 55
TotalSize 56
FreeSpace 57
ClusterSize 58
VolumeName 59
LocalName 60
Provider 61
NtSecure 62
IsAltStream 63
IsAux 64
IsDeleted 65
IsTree 66
Sha1 67
Sha256 68
ErrorType 69
NumErrors 70
ErrorFlags 71
WarningFlags 72
Warning 73
NumStreams 74
NumAltStreams 75
AltStreamsSize 76
VirtualSize 77
UnpackSize 78
TotalPhySize 79
VolumeIndex 80
SubType 81
ShortComment 82
CodePage 83
IsNotArcType 84
PhySizeCantBeDetected 85
ZerosTailIsAllowed 86
TailSize 87
EmbeddedStubSize 88
NtReparse 89
HardLink 90
INode 91
StreamId 92
ReadOnly 93
OutName 94
CopyLink 95
#include <bit7z/bitpropvariant.hpp>

enum class BitPropVariantType

The BitPropVariantType enum represents the possible types that a BitPropVariant can store.

Constant Value Description
Empty 0 Empty BitPropVariant type.
Bool 1 Boolean BitPropVariant type.
String 2 String BitPropVariant type.
UInt8 3 8-bit unsigned int BitPropVariant type
UInt16 4 16-bit unsigned int BitPropVariant type
UInt32 5 32-bit unsigned int BitPropVariant type
UInt64 6 64-bit unsigned int BitPropVariant type
Int8 7 8-bit signed int BitPropVariant type
Int16 8 16-bit signed int BitPropVariant type
Int32 9 32-bit signed int BitPropVariant type
Int64 10 64-bit signed int BitPropVariant type
FileTime 11 FILETIME BitPropVariant type.
#include <bit7z/bitpropvariant.hpp>

enum class FilterPolicy

Enumeration representing the policy according to which the archive handler should treat the items that match the pattern given by the user.

Constant Value Description
Include 0 Extract/compress the items that match the pattern.
Exclude 1 Do not extract/compress the items that match the pattern.
#include <bit7z/bitabstractarchivehandler.hpp>

enum class FormatFeatures

The FormatFeatures enum specifies the features supported by an archive file format.

Constant Value Description
MultipleFiles 1u << 0 The format can compress/extract multiple files (2^0 = 0000001)
SolidArchive 1u << 1 The format supports solid archives (2^1 = 0000010)
CompressionLevel 1u << 2 The format is able to use different compression levels (2^2 = 0000100)
Encryption 1u << 3 The format supports archive encryption (2^3 = 0001000)
HeaderEncryption 1u << 4 The format can encrypt the file names (2^4 = 0010000)
MultipleMethods 1u << 5 The format can use different compression methods (2^6 = 0100000)
#include <bit7z/bitformat.hpp>

enum class OverwriteMode

Enumeration representing how a handler should deal when an output file already exists.

Constant Value Description
None 0 The handler will throw an exception if the output file or buffer already exists.
Overwrite 1 The handler will overwrite the old file or buffer with the new one.
Skip 2 The handler will skip writing to the output file or buffer.
#include <bit7z/bitabstractarchivehandler.hpp>

enum class UpdateMode

Enumeration representing how an archive creator should deal when the output archive already exists.

Constant Value Description
None 0 The creator will throw an exception (unless the OverwriteMode is not None).
Append 1 The creator will append the new items to the existing archive.
Update 2 New items whose path already exists in the archive will overwrite the old ones, other will be appended.
Overwrite Update [Deprecated] Deprecated since v4.0; please use the UpdateMode::Update enumerator.
#include <bit7z/bitabstractarchivecreator.hpp>

typedef byte_t

Alias for unsigned char.

A type representing a byte.

#include <bit7z/bittypes.hpp>

typedef FileCallback

Alias for std::function< void(tstring) >.

A std::function whose argument is the path, in the archive, of the file currently being processed by the ongoing operation.

#include <bit7z/bitabstractarchivehandler.hpp>

typedef native_string

Alias for std::string.

Native string type of the system.

Note

On Windows, it is an alias of std::wstring.

#include <bit7z/bittypes.hpp>

typedef PasswordCallback

Alias for std::function< tstring() >.

A std::function returning the password to be used to handle an archive.

#include <bit7z/bitabstractarchivehandler.hpp>

typedef ProgressCallback

Alias for std::function< bool(uint64_t) >.

A std::function whose argument is the currently processed size of the ongoing operation and returns true or false whether the operation must continue or not.

#include <bit7z/bitabstractarchivehandler.hpp>

typedef RatioCallback

Alias for std::function< void(uint64_t, uint64_t) >.

A std::function whose arguments are the current processed input size, and the current output size of the ongoing operation.

#include <bit7z/bitabstractarchivehandler.hpp>

typedef tchar

Alias for char.

Note

On Windows, if the BIT7Z_USE_NATIVE_STRING option is enabled, tchar is an alias of wchar_t.

#include <bit7z/bittypes.hpp>

typedef time_type

Alias for std::chrono::time_point< std::chrono::system_clock >.

A type representing a time point measured using the system clock.

#include <bit7z/bitpropvariant.hpp>

typedef TotalCallback

Alias for std::function< void(uint64_t) >.

A std::function whose argument is the total size of the ongoing operation.

#include <bit7z/bitabstractarchivehandler.hpp>

typedef tregex

Alias for std::basic_regex< tchar >.

Note

On Windows, if the BIT7Z_USE_NATIVE_STRING option is enabled, tregex is an alias for std::wregex. Otherwise, it is an alias for std::regex (default).

#include <bit7z/bittypes.hpp>

typedef tstring

Alias for std::basic_string< tchar >.

Note

On Windows, if the BIT7Z_USE_NATIVE_STRING option is enabled, tstring is an alias for std::wstring. Otherwise, it is an alias for std::string (default).

#include <bit7z/bittypes.hpp>

Constants

Type Name Description
constexpr auto bit7z::kDefaultLibrary The default file path for the 7-zip shared library to be used by bit7z in case the user doesn't pass a path to the constructor of the Bit7zLibrary class.
Clone this wiki locally