Repository navigation
enums
Offset from where the archive starts within the input file.
| Constant | Value | Description |
|---|---|---|
NoneOffset |
0 | Don't specify an archive start offset. For some formats, like Zip archives, this means that the whole input file will be searched for the archive's start. |
FileStart |
1 | Check only the file start for the archive's start. |
Compression level used when creating archives.
| Constant | Value | Description |
|---|---|---|
NoneCompression |
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. |
Compression methods used when creating archives.
| Constant | Value | Description |
|---|---|---|
Copy |
0 | No compression (the data is stored as-is). |
Deflate |
1 | The Deflate compression method. |
Deflate64 |
2 | The Deflate64 compression method. |
BZip2 |
3 | The BZip2 compression method. |
Lzma |
4 | The LZMA compression method. |
Lzma2 |
5 | The LZMA2 compression method. |
Ppmd |
6 | The PPMd compression method. |
bit7z specific errors.
| Constant | Value | Description |
|---|---|---|
Fail |
1 | Unspecified error. |
FilterNotSpecified |
1 | No item filter was specified. |
FormatFeatureNotSupported |
2 | The requested feature is not supported by the archive format. |
IndicesNotSpecified |
3 | No item indices were specified. |
InvalidArchivePath |
4 | Invalid archive path. |
InvalidOutputBufferSize |
5 | Invalid output buffer size. |
InvalidCompressionMethod |
6 | Invalid compression method for the chosen archive format. |
InvalidDictionarySize |
7 | Invalid dictionary size for the chosen compression method. |
InvalidIndex |
8 | Invalid item index. |
InvalidWordSize |
9 | Invalid word size for the chosen compression method. |
ItemIsAFolder |
10 | The item is a folder, but a file was expected. |
ItemMarkedAsDeleted |
11 | The item is marked as deleted. |
NoMatchingItems |
12 | No matching item was found in the archive. |
NoMatchingFile |
13 | No matching file was found in the archive. |
NoMatchingSignature |
14 | No known archive signature was found. |
NonEmptyOutputBuffer |
15 | The given output buffer is not empty. |
NullOutputBuffer |
16 | The given output buffer is null. |
RequestedWrongVariantType |
17 | The wrong variant type was requested. |
UnsupportedOperation |
18 | Unsupported operation. |
UnsupportedVariantType |
19 | Unsupported variant type. |
WrongUpdateMode |
20 | Wrong update mode. |
InvalidZipPassword |
21 | The Zip format only supports printable ASCII characters in passwords. |
InvalidDirectoryPath |
22 | Invalid directory path. |
ItemPathOutsideOutputDirectory |
23 | The extracted item path would be outside the output directory. |
ItemHasAbsolutePath |
24 | The item has an absolute path. |
InvalidItemPath |
25 | The item has an invalid path. |
Error conditions that can be used for querying bit7z's error_codes.
| Constant | Value | Description |
|---|---|---|
CRCError |
0 | A CRC check failed. |
DataAfterEnd |
1 | Some data was found after the end of the payload data. |
DataError |
2 | A data error was encountered. |
InvalidArchive |
3 | The input is not a valid archive. |
InvalidArgument |
4 | An invalid argument was provided. |
FormatDetectionError |
5 | The archive format could not be detected. |
HeadersError |
6 | An error was encountered while reading the archive headers. |
NoSuchItem |
7 | The requested item does not exist. |
OperationNotSupported |
8 | The requested operation is not supported. |
OperationNotPermitted |
9 | The requested operation is not permitted. |
UnavailableData |
10 | The requested data is unavailable. |
UnexpectedEnd |
11 | An unexpected end of data was reached. |
WrongPassword |
12 | A wrong password was provided. |
Archive/item properties that 7-zip can read or write.
| Constant | Value |
|---|---|
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 |
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. |
How the deletion of an item from an archive should be handled.
| Constant | Value | Description |
|---|---|---|
ItemOnly |
0 | Delete only the item itself; if it is a folder, its contents are kept. |
RecurseDirs |
1 | Delete the item; if it is a folder, its contents are recursively deleted too. |
Scope of encryption applied when setting a password on an archive.
| Constant | Value | Description |
|---|---|---|
DataOnly |
0 | Only the archive's file data is encrypted. |
DataAndHeaders |
1 | Both the archive's file data and headers are encrypted (valid only for the 7z format). |
Policy for treating items that match a given pattern.
| 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. |
Result of applying a filter callback on an archive item.
| Constant | Value | Description |
|---|---|---|
ProcessItem |
0 | Continue processing the item. |
SkipItem |
1 | Skip the item (do not process it). |
AbortOperation |
2 | Abort the whole operation. |
Warning
The following constants are deprecated aliases provided for backward compatibility:
-
Process→ useProcessIteminstead. -
Skip→ useSkipIteminstead. -
Abort→ useAbortOperationinstead.
Policy controlling how a folder's path is reflected in the extracted items' paths.
| Constant | Value | Description |
|---|---|---|
Strip |
0 | Remove the folder path from the extracted path. |
KeepName |
1 | Preserve the folder name in the extracted path. |
KeepPath |
2 | Preserve the full folder path in the extracted path. |
Features supported by an archive file format.
| Constant | Value | Description |
|---|---|---|
MultipleFiles |
1 | The format can compress/extract multiple files. |
SolidArchive |
2 | The format supports solid archives. |
CompressionLevel |
4 | The format is able to use different compression levels. |
Encryption |
8 | The format supports archive encryption. |
HeaderEncryption |
16 | The format can encrypt the file names. |
MultipleMethods |
32 | The format can use different compression methods. |
How a handler should behave when an output file already exists.
| Constant | Value | Description |
|---|---|---|
NoneOverwrite |
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. |
How an input item should deal with symbolic links.
| Constant | Value | Description |
|---|---|---|
Follow |
0 | Follow symbolic links, storing the content of the pointed-to file. |
DoNotFollow |
1 | Do not follow symbolic links, storing the link itself. |
How an archive creator should deal with an existing output archive.
| Constant | Value | Description |
|---|---|---|
NoneUpdate |
0 | The creator will throw an exception (unless the OverwriteMode is not NoneOverwrite). |
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, others will be appended. |
Warning
Overwrite is deprecated since v4.0; use Update instead.