react-native-update 10.53.0 → 10.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README-CN.md +31 -31
- package/README.md +31 -31
- package/android/jni/HDiffPatch/.travis.yml +33 -0
- package/android/jni/HDiffPatch/builds/xcode/bestParams.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/android/jni/HDiffPatch/builds/xcode/hdiffz.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/android/jni/HDiffPatch/builds/xcode/hdiffz.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/android/jni/HDiffPatch/builds/xcode/hpatchz.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/android/jni/HDiffPatch/builds/xcode/lz4.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/android/jni/HDiffPatch/builds/xcode/lzma.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/android/jni/HDiffPatch/builds/xcode/testHashClash.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/android/jni/HDiffPatch/builds/xcode/testHashClash.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/android/jni/HDiffPatch/builds/xcode/unitTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/android/jni/HDiffPatch/builds/xcode/zstd.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/android/jni/lzma/DOC/7zC.txt +187 -0
- package/android/jni/lzma/DOC/7zFormat.txt +469 -0
- package/android/jni/lzma/DOC/Methods.txt +173 -0
- package/android/jni/lzma/DOC/installer.txt +166 -0
- package/android/jni/lzma/DOC/lzma-history.txt +446 -0
- package/android/jni/lzma/DOC/lzma-sdk.txt +357 -0
- package/android/jni/lzma/DOC/lzma-specification.txt +1176 -0
- package/android/jni/lzma/DOC/lzma.txt +328 -0
- package/android/jni/lzma/bin/7zS2.sfx +0 -0
- package/android/jni/lzma/bin/7zS2con.sfx +0 -0
- package/android/jni/lzma/bin/7zSD.sfx +0 -0
- package/android/jni/lzma/bin/7zdec.exe +0 -0
- package/android/jni/lzma/bin/7zr.exe +0 -0
- package/android/jni/lzma/bin/installer/config.txt +5 -0
- package/android/jni/lzma/bin/installer/cr.bat +5 -0
- package/android/jni/lzma/bin/lzma.exe +0 -0
- package/android/jni/lzma/bin/x64/7zr.exe +0 -0
- package/android/lib/arm64-v8a/librnupdate.so +0 -0
- package/android/lib/armeabi-v7a/librnupdate.so +0 -0
- package/android/lib/x86/librnupdate.so +0 -0
- package/android/lib/x86_64/librnupdate.so +0 -0
- package/android/src/main/java/cn/reactnative/modules/update/ApkInstaller.java +62 -30
- package/android/src/main/java/cn/reactnative/modules/update/ArchiveLimits.java +44 -0
- package/android/src/main/java/cn/reactnative/modules/update/DownloadTask.java +124 -40
- package/android/src/main/java/cn/reactnative/modules/update/InstallRecord.java +125 -0
- package/android/src/main/java/cn/reactnative/modules/update/NativeCheckOrchestrator.java +43 -11
- package/android/src/main/java/cn/reactnative/modules/update/NativeUpdateFlow.java +2 -0
- package/android/src/main/java/cn/reactnative/modules/update/SafeZipFile.java +90 -0
- package/android/src/main/java/cn/reactnative/modules/update/UpdateContext.java +79 -19
- package/android/src/main/java/cn/reactnative/modules/update/UpdateFileUtils.java +21 -0
- package/android/src/main/java/cn/reactnative/modules/update/UpdateModuleImpl.java +56 -17
- package/android/src/main/java/cn/reactnative/modules/update/UpdateModuleSupport.java +1 -0
- package/android/src/newarch/cn/reactnative/modules/update/UpdateModule.java +5 -0
- package/android/src/oldarch/cn/reactnative/modules/update/UpdateModule.java +5 -0
- package/cpp/patch_core/archive_limits.h +38 -0
- package/cpp/patch_core/install_record.h +36 -0
- package/cpp/update_flow_core/flow_json.h +1 -0
- package/cpp/update_flow_core/update_flow_core.cpp +41 -7
- package/cpp/update_flow_core/update_flow_core.h +9 -0
- package/cpp/update_flow_core/update_flow_jni.cpp +12 -0
- package/harmony/pushy/src/main/cpp/PushyTurboModule.cpp +2 -0
- package/harmony/pushy/src/main/cpp/pushy.cpp +37 -0
- package/harmony/pushy/src/main/ets/ArchiveLimits.ts +83 -0
- package/harmony/pushy/src/main/ets/DownloadTask.ts +126 -30
- package/harmony/pushy/src/main/ets/InstallRecord.ts +129 -0
- package/harmony/pushy/src/main/ets/NativeCheckOrchestrator.ts +24 -2
- package/harmony/pushy/src/main/ets/NativePatchCore.ts +5 -0
- package/harmony/pushy/src/main/ets/PushyTurboModule.ts +12 -0
- package/harmony/pushy/src/main/ets/UpdateContext.ts +78 -15
- package/harmony/pushy.har +0 -0
- package/ios/RCTPushy/RCTPushy.mm +384 -25
- package/ios/RCTPushy/RCTPushyDownloader.mm +32 -0
- package/package.json +25 -2
- package/src/NativePushy.ts +13 -0
- package/src/client.ts +160 -43
- package/src/core.ts +17 -3
- package/src/error.ts +3 -0
- package/src/index.ts +8 -0
- package/src/locales/en.ts +3 -0
- package/src/locales/zh.ts +2 -0
- package/src/metadata.ts +166 -0
- package/src/provider.tsx +52 -17
- package/src/type.ts +22 -0
- package/src/updateFlowCore.ts +95 -4
- package/src/utils.ts +31 -19
- package/.gitmodules +0 -6
- package/BUNDLEHASH_MIGRATION.md +0 -355
- package/NATIVE_CHECKUPDATE_DESIGN.md +0 -539
- package/NATIVE_CHECK_FOLLOWUPS.md +0 -514
- package/android/jni/HDiffPatch/test/_private_searchBestParams.cpp +0 -301
- package/android/jni/HDiffPatch/test/hpatchz_test.cpp +0 -292
- package/android/jni/HDiffPatch/test/testHashClash.cpp +0 -436
- package/android/jni/HDiffPatch/test/unit_test.cpp +0 -417
- package/biome.json +0 -59
- package/cpp/patch_core/tests/fixtures/rawstored.lzma2label.patch.bin +0 -0
- package/cpp/patch_core/tests/fixtures/rawstored.new.bin +0 -0
- package/cpp/patch_core/tests/fixtures/rawstored.old.bin +0 -0
- package/cpp/patch_core/tests/fixtures/v96.hbc +0 -0
- package/cpp/patch_core/tests/fixtures/v96.meta.json +0 -1
- package/cpp/patch_core/tests/fixtures/v96.streampatch.bin +0 -0
- package/cpp/patch_core/tests/fixtures/v96.t.hbc +0 -0
- package/cpp/patch_core/tests/fixtures/v96.tpatch.bin +0 -0
- package/cpp/patch_core/tests/fixtures/v96.tstreampatch.bin +0 -0
- package/cpp/patch_core/tests/fixtures/v96b.hbc +0 -0
- package/cpp/patch_core/tests/fixtures/v98.hbc +0 -0
- package/cpp/patch_core/tests/fixtures/v98.t.hbc +0 -0
- package/cpp/patch_core/tests/fixtures/v98b.hbc +0 -0
- package/cpp/patch_core/tests/fixtures/v98b.t.hbc +0 -0
- package/cpp/patch_core/tests/hbc_transform_test.cpp +0 -384
- package/cpp/patch_core/tests/patch_core_test.cpp +0 -970
- package/cpp/update_flow_core/tests/flow_vectors.json +0 -1401
- package/cpp/update_flow_core/tests/update_flow_core_test.cpp +0 -317
- package/scripts/check-expo-version.js +0 -92
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
7z Format description (18.06)
|
|
2
|
+
----------------------------
|
|
3
|
+
|
|
4
|
+
This file contains description of 7z archive format.
|
|
5
|
+
7z archive can contain files compressed with any method.
|
|
6
|
+
See "Methods.txt" for description for defined compressing methods.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Format structure Overview
|
|
10
|
+
-------------------------
|
|
11
|
+
|
|
12
|
+
Some fields can be optional.
|
|
13
|
+
|
|
14
|
+
Archive structure
|
|
15
|
+
~~~~~~~~~~~~~~~~~
|
|
16
|
+
SignatureHeader
|
|
17
|
+
[PackedStreams]
|
|
18
|
+
[PackedStreamsForHeaders]
|
|
19
|
+
[
|
|
20
|
+
Header
|
|
21
|
+
or
|
|
22
|
+
{
|
|
23
|
+
Packed Header
|
|
24
|
+
HeaderInfo
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
Header structure
|
|
31
|
+
~~~~~~~~~~~~~~~~
|
|
32
|
+
{
|
|
33
|
+
ArchiveProperties
|
|
34
|
+
AdditionalStreams
|
|
35
|
+
{
|
|
36
|
+
PackInfo
|
|
37
|
+
{
|
|
38
|
+
PackPos
|
|
39
|
+
NumPackStreams
|
|
40
|
+
Sizes[NumPackStreams]
|
|
41
|
+
CRCs[NumPackStreams]
|
|
42
|
+
}
|
|
43
|
+
CodersInfo
|
|
44
|
+
{
|
|
45
|
+
NumFolders
|
|
46
|
+
Folders[NumFolders]
|
|
47
|
+
{
|
|
48
|
+
NumCoders
|
|
49
|
+
CodersInfo[NumCoders]
|
|
50
|
+
{
|
|
51
|
+
ID
|
|
52
|
+
NumInStreams;
|
|
53
|
+
NumOutStreams;
|
|
54
|
+
PropertiesSize
|
|
55
|
+
Properties[PropertiesSize]
|
|
56
|
+
}
|
|
57
|
+
NumBindPairs
|
|
58
|
+
BindPairsInfo[NumBindPairs]
|
|
59
|
+
{
|
|
60
|
+
InIndex;
|
|
61
|
+
OutIndex;
|
|
62
|
+
}
|
|
63
|
+
PackedIndices
|
|
64
|
+
}
|
|
65
|
+
UnPackSize[Folders][Folders.NumOutstreams]
|
|
66
|
+
CRCs[NumFolders]
|
|
67
|
+
}
|
|
68
|
+
SubStreamsInfo
|
|
69
|
+
{
|
|
70
|
+
NumUnPackStreamsInFolders[NumFolders];
|
|
71
|
+
UnPackSizes[]
|
|
72
|
+
CRCs[]
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
MainStreamsInfo
|
|
76
|
+
{
|
|
77
|
+
(Same as in AdditionalStreams)
|
|
78
|
+
}
|
|
79
|
+
FilesInfo
|
|
80
|
+
{
|
|
81
|
+
NumFiles
|
|
82
|
+
Properties[]
|
|
83
|
+
{
|
|
84
|
+
ID
|
|
85
|
+
Size
|
|
86
|
+
Data
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
HeaderInfo structure
|
|
92
|
+
~~~~~~~~~~~~~~~~~~~~
|
|
93
|
+
{
|
|
94
|
+
(Same as in AdditionalStreams)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
Notes about Notation and encoding
|
|
100
|
+
---------------------------------
|
|
101
|
+
|
|
102
|
+
7z uses little endian encoding.
|
|
103
|
+
|
|
104
|
+
7z archive format has optional headers that are marked as
|
|
105
|
+
[]
|
|
106
|
+
Header
|
|
107
|
+
[]
|
|
108
|
+
|
|
109
|
+
REAL_UINT64 means real UINT64.
|
|
110
|
+
|
|
111
|
+
UINT64 means real UINT64 encoded with the following scheme:
|
|
112
|
+
|
|
113
|
+
Size of encoding sequence depends from first byte:
|
|
114
|
+
First_Byte Extra_Bytes Value
|
|
115
|
+
(binary)
|
|
116
|
+
0xxxxxxx : ( xxxxxxx )
|
|
117
|
+
10xxxxxx BYTE y[1] : ( xxxxxx << (8 * 1)) + y
|
|
118
|
+
110xxxxx BYTE y[2] : ( xxxxx << (8 * 2)) + y
|
|
119
|
+
...
|
|
120
|
+
1111110x BYTE y[6] : ( x << (8 * 6)) + y
|
|
121
|
+
11111110 BYTE y[7] : y
|
|
122
|
+
11111111 BYTE y[8] : y
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
Property IDs
|
|
127
|
+
------------
|
|
128
|
+
|
|
129
|
+
0x00 = kEnd
|
|
130
|
+
|
|
131
|
+
0x01 = kHeader
|
|
132
|
+
|
|
133
|
+
0x02 = kArchiveProperties
|
|
134
|
+
|
|
135
|
+
0x03 = kAdditionalStreamsInfo
|
|
136
|
+
0x04 = kMainStreamsInfo
|
|
137
|
+
0x05 = kFilesInfo
|
|
138
|
+
|
|
139
|
+
0x06 = kPackInfo
|
|
140
|
+
0x07 = kUnPackInfo
|
|
141
|
+
0x08 = kSubStreamsInfo
|
|
142
|
+
|
|
143
|
+
0x09 = kSize
|
|
144
|
+
0x0A = kCRC
|
|
145
|
+
|
|
146
|
+
0x0B = kFolder
|
|
147
|
+
|
|
148
|
+
0x0C = kCodersUnPackSize
|
|
149
|
+
0x0D = kNumUnPackStream
|
|
150
|
+
|
|
151
|
+
0x0E = kEmptyStream
|
|
152
|
+
0x0F = kEmptyFile
|
|
153
|
+
0x10 = kAnti
|
|
154
|
+
|
|
155
|
+
0x11 = kName
|
|
156
|
+
0x12 = kCTime
|
|
157
|
+
0x13 = kATime
|
|
158
|
+
0x14 = kMTime
|
|
159
|
+
0x15 = kWinAttributes
|
|
160
|
+
0x16 = kComment
|
|
161
|
+
|
|
162
|
+
0x17 = kEncodedHeader
|
|
163
|
+
|
|
164
|
+
0x18 = kStartPos
|
|
165
|
+
0x19 = kDummy
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
7z format headers
|
|
169
|
+
-----------------
|
|
170
|
+
|
|
171
|
+
SignatureHeader
|
|
172
|
+
~~~~~~~~~~~~~~~
|
|
173
|
+
BYTE kSignature[6] = {'7', 'z', 0xBC, 0xAF, 0x27, 0x1C};
|
|
174
|
+
|
|
175
|
+
ArchiveVersion
|
|
176
|
+
{
|
|
177
|
+
BYTE Major; // now = 0
|
|
178
|
+
BYTE Minor; // now = 4
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
UINT32 StartHeaderCRC;
|
|
182
|
+
|
|
183
|
+
StartHeader
|
|
184
|
+
{
|
|
185
|
+
REAL_UINT64 NextHeaderOffset
|
|
186
|
+
REAL_UINT64 NextHeaderSize
|
|
187
|
+
UINT32 NextHeaderCRC
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
...........................
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
ArchiveProperties
|
|
195
|
+
~~~~~~~~~~~~~~~~~
|
|
196
|
+
BYTE NID::kArchiveProperties (0x02)
|
|
197
|
+
for (;;)
|
|
198
|
+
{
|
|
199
|
+
BYTE PropertyType;
|
|
200
|
+
if (aType == 0)
|
|
201
|
+
break;
|
|
202
|
+
UINT64 PropertySize;
|
|
203
|
+
BYTE PropertyData[PropertySize];
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
Digests (NumStreams)
|
|
208
|
+
~~~~~~~~~~~~~~~~~~~~~
|
|
209
|
+
BYTE AllAreDefined
|
|
210
|
+
if (AllAreDefined == 0)
|
|
211
|
+
{
|
|
212
|
+
for(NumStreams)
|
|
213
|
+
BIT Defined
|
|
214
|
+
}
|
|
215
|
+
UINT32 CRCs[NumDefined]
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
PackInfo
|
|
219
|
+
~~~~~~~~~~~~
|
|
220
|
+
BYTE NID::kPackInfo (0x06)
|
|
221
|
+
UINT64 PackPos
|
|
222
|
+
UINT64 NumPackStreams
|
|
223
|
+
|
|
224
|
+
[]
|
|
225
|
+
BYTE NID::kSize (0x09)
|
|
226
|
+
UINT64 PackSizes[NumPackStreams]
|
|
227
|
+
[]
|
|
228
|
+
|
|
229
|
+
[]
|
|
230
|
+
BYTE NID::kCRC (0x0A)
|
|
231
|
+
PackStreamDigests[NumPackStreams]
|
|
232
|
+
[]
|
|
233
|
+
|
|
234
|
+
BYTE NID::kEnd
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
Folder
|
|
238
|
+
~~~~~~
|
|
239
|
+
UINT64 NumCoders;
|
|
240
|
+
for (NumCoders)
|
|
241
|
+
{
|
|
242
|
+
BYTE
|
|
243
|
+
{
|
|
244
|
+
0:3 CodecIdSize
|
|
245
|
+
4: Is Complex Coder
|
|
246
|
+
5: There Are Attributes
|
|
247
|
+
6: Reserved
|
|
248
|
+
7: There are more alternative methods. (Not used anymore, must be 0).
|
|
249
|
+
}
|
|
250
|
+
BYTE CodecId[CodecIdSize]
|
|
251
|
+
if (Is Complex Coder)
|
|
252
|
+
{
|
|
253
|
+
UINT64 NumInStreams;
|
|
254
|
+
UINT64 NumOutStreams;
|
|
255
|
+
}
|
|
256
|
+
if (There Are Attributes)
|
|
257
|
+
{
|
|
258
|
+
UINT64 PropertiesSize
|
|
259
|
+
BYTE Properties[PropertiesSize]
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
NumBindPairs = NumOutStreamsTotal - 1;
|
|
264
|
+
|
|
265
|
+
for (NumBindPairs)
|
|
266
|
+
{
|
|
267
|
+
UINT64 InIndex;
|
|
268
|
+
UINT64 OutIndex;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
NumPackedStreams = NumInStreamsTotal - NumBindPairs;
|
|
272
|
+
if (NumPackedStreams > 1)
|
|
273
|
+
for(NumPackedStreams)
|
|
274
|
+
{
|
|
275
|
+
UINT64 Index;
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
Coders Info
|
|
282
|
+
~~~~~~~~~~~
|
|
283
|
+
|
|
284
|
+
BYTE NID::kUnPackInfo (0x07)
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
BYTE NID::kFolder (0x0B)
|
|
288
|
+
UINT64 NumFolders
|
|
289
|
+
BYTE External
|
|
290
|
+
switch(External)
|
|
291
|
+
{
|
|
292
|
+
case 0:
|
|
293
|
+
Folders[NumFolders]
|
|
294
|
+
case 1:
|
|
295
|
+
UINT64 DataStreamIndex
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
BYTE ID::kCodersUnPackSize (0x0C)
|
|
300
|
+
for(Folders)
|
|
301
|
+
for(Folder.NumOutStreams)
|
|
302
|
+
UINT64 UnPackSize;
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
[]
|
|
306
|
+
BYTE NID::kCRC (0x0A)
|
|
307
|
+
UnPackDigests[NumFolders]
|
|
308
|
+
[]
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
BYTE NID::kEnd
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
SubStreams Info
|
|
317
|
+
~~~~~~~~~~~~~~
|
|
318
|
+
BYTE NID::kSubStreamsInfo; (0x08)
|
|
319
|
+
|
|
320
|
+
[]
|
|
321
|
+
BYTE NID::kNumUnPackStream; (0x0D)
|
|
322
|
+
UINT64 NumUnPackStreamsInFolders[NumFolders];
|
|
323
|
+
[]
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
[]
|
|
327
|
+
BYTE NID::kSize (0x09)
|
|
328
|
+
UINT64 UnPackSizes[]
|
|
329
|
+
[]
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
[]
|
|
333
|
+
BYTE NID::kCRC (0x0A)
|
|
334
|
+
Digests[Number of streams with unknown CRC]
|
|
335
|
+
[]
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
BYTE NID::kEnd
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
Streams Info
|
|
342
|
+
~~~~~~~~~~~~
|
|
343
|
+
|
|
344
|
+
[]
|
|
345
|
+
PackInfo
|
|
346
|
+
[]
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
[]
|
|
350
|
+
CodersInfo
|
|
351
|
+
[]
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
[]
|
|
355
|
+
SubStreamsInfo
|
|
356
|
+
[]
|
|
357
|
+
|
|
358
|
+
BYTE NID::kEnd
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
FilesInfo
|
|
362
|
+
~~~~~~~~~
|
|
363
|
+
BYTE NID::kFilesInfo; (0x05)
|
|
364
|
+
UINT64 NumFiles
|
|
365
|
+
|
|
366
|
+
for (;;)
|
|
367
|
+
{
|
|
368
|
+
BYTE PropertyType;
|
|
369
|
+
if (aType == 0)
|
|
370
|
+
break;
|
|
371
|
+
|
|
372
|
+
UINT64 Size;
|
|
373
|
+
|
|
374
|
+
switch(PropertyType)
|
|
375
|
+
{
|
|
376
|
+
kEmptyStream: (0x0E)
|
|
377
|
+
for(NumFiles)
|
|
378
|
+
BIT IsEmptyStream
|
|
379
|
+
|
|
380
|
+
kEmptyFile: (0x0F)
|
|
381
|
+
for(EmptyStreams)
|
|
382
|
+
BIT IsEmptyFile
|
|
383
|
+
|
|
384
|
+
kAnti: (0x10)
|
|
385
|
+
for(EmptyStreams)
|
|
386
|
+
BIT IsAntiFile
|
|
387
|
+
|
|
388
|
+
case kCTime: (0x12)
|
|
389
|
+
case kATime: (0x13)
|
|
390
|
+
case kMTime: (0x14)
|
|
391
|
+
BYTE AllAreDefined
|
|
392
|
+
if (AllAreDefined == 0)
|
|
393
|
+
{
|
|
394
|
+
for(NumFiles)
|
|
395
|
+
BIT TimeDefined
|
|
396
|
+
}
|
|
397
|
+
BYTE External;
|
|
398
|
+
if(External != 0)
|
|
399
|
+
UINT64 DataIndex
|
|
400
|
+
[]
|
|
401
|
+
for(Definded Items)
|
|
402
|
+
REAL_UINT64 Time
|
|
403
|
+
[]
|
|
404
|
+
|
|
405
|
+
kNames: (0x11)
|
|
406
|
+
BYTE External;
|
|
407
|
+
if(External != 0)
|
|
408
|
+
UINT64 DataIndex
|
|
409
|
+
[]
|
|
410
|
+
for(Files)
|
|
411
|
+
{
|
|
412
|
+
wchar_t Names[NameSize];
|
|
413
|
+
wchar_t 0;
|
|
414
|
+
}
|
|
415
|
+
[]
|
|
416
|
+
|
|
417
|
+
kAttributes: (0x15)
|
|
418
|
+
BYTE AllAreDefined
|
|
419
|
+
if (AllAreDefined == 0)
|
|
420
|
+
{
|
|
421
|
+
for(NumFiles)
|
|
422
|
+
BIT AttributesAreDefined
|
|
423
|
+
}
|
|
424
|
+
BYTE External;
|
|
425
|
+
if(External != 0)
|
|
426
|
+
UINT64 DataIndex
|
|
427
|
+
[]
|
|
428
|
+
for(Definded Attributes)
|
|
429
|
+
UINT32 Attributes
|
|
430
|
+
[]
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
Header
|
|
436
|
+
~~~~~~
|
|
437
|
+
BYTE NID::kHeader (0x01)
|
|
438
|
+
|
|
439
|
+
[]
|
|
440
|
+
ArchiveProperties
|
|
441
|
+
[]
|
|
442
|
+
|
|
443
|
+
[]
|
|
444
|
+
BYTE NID::kAdditionalStreamsInfo; (0x03)
|
|
445
|
+
StreamsInfo
|
|
446
|
+
[]
|
|
447
|
+
|
|
448
|
+
[]
|
|
449
|
+
BYTE NID::kMainStreamsInfo; (0x04)
|
|
450
|
+
StreamsInfo
|
|
451
|
+
[]
|
|
452
|
+
|
|
453
|
+
[]
|
|
454
|
+
FilesInfo
|
|
455
|
+
[]
|
|
456
|
+
|
|
457
|
+
BYTE NID::kEnd
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
HeaderInfo
|
|
461
|
+
~~~~~~~~~~
|
|
462
|
+
[]
|
|
463
|
+
BYTE NID::kEncodedHeader; (0x17)
|
|
464
|
+
StreamsInfo for Encoded Header
|
|
465
|
+
[]
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
---
|
|
469
|
+
End of document
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
7-Zip method IDs for 7z and xz archives
|
|
2
|
+
---------------------------------------
|
|
3
|
+
|
|
4
|
+
Version: 18.06
|
|
5
|
+
Date: 2018-06-30
|
|
6
|
+
|
|
7
|
+
Each compression or crypto method in 7z is associated with unique binary value (ID).
|
|
8
|
+
The length of ID in bytes is arbitrary but it can not exceed 63 bits (8 bytes).
|
|
9
|
+
|
|
10
|
+
xz and 7z formats use same ID map.
|
|
11
|
+
|
|
12
|
+
If you want to add some new ID, you have two ways:
|
|
13
|
+
1) Write request for allocating IDs to 7-Zip developers.
|
|
14
|
+
2) Generate 8-bytes ID:
|
|
15
|
+
|
|
16
|
+
3F ZZ ZZ ZZ ZZ ZZ MM MM
|
|
17
|
+
|
|
18
|
+
3F - Prefix for random IDs (1 byte)
|
|
19
|
+
ZZ ZZ ZZ ZZ ZZ - Developer ID (5 bytes). Use real random bytes.
|
|
20
|
+
|
|
21
|
+
MM MM - Method ID (2 bytes)
|
|
22
|
+
|
|
23
|
+
You can notify 7-Zip developers about your Developer ID / Method ID.
|
|
24
|
+
|
|
25
|
+
Note: Use new ID, if old codec can not decode data encoded with new version.
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
List of defined IDs
|
|
29
|
+
-------------------
|
|
30
|
+
|
|
31
|
+
00 - Copy
|
|
32
|
+
|
|
33
|
+
03 - Delta
|
|
34
|
+
04 - BCJ (x86)
|
|
35
|
+
05 - PPC (big-endian)
|
|
36
|
+
06 - IA64
|
|
37
|
+
07 - ARM (little-endian)
|
|
38
|
+
08 - ARMT (little-endian)
|
|
39
|
+
09 - SPARC
|
|
40
|
+
|
|
41
|
+
21 - LZMA2
|
|
42
|
+
|
|
43
|
+
02.. - Common
|
|
44
|
+
03 [Swap]
|
|
45
|
+
- 2 Swap2
|
|
46
|
+
- 4 Swap4
|
|
47
|
+
|
|
48
|
+
03.. - 7z
|
|
49
|
+
01 -
|
|
50
|
+
01 - LZMA
|
|
51
|
+
|
|
52
|
+
03 - [Branch Codecs]
|
|
53
|
+
01 - [x86 Codecs]
|
|
54
|
+
03 - BCJ
|
|
55
|
+
1B - BCJ2 (4 packed streams)
|
|
56
|
+
02 -
|
|
57
|
+
05 - PPC (big-endian)
|
|
58
|
+
03 -
|
|
59
|
+
01 - Alpha
|
|
60
|
+
04 -
|
|
61
|
+
01 - IA64
|
|
62
|
+
05 -
|
|
63
|
+
01 - ARM (little-endian)
|
|
64
|
+
06 -
|
|
65
|
+
05 - M68 (big-endian)
|
|
66
|
+
07 -
|
|
67
|
+
01 - ARMT (little-endian)
|
|
68
|
+
08 -
|
|
69
|
+
05 - SPARC
|
|
70
|
+
|
|
71
|
+
04 -
|
|
72
|
+
01 - PPMD
|
|
73
|
+
|
|
74
|
+
7F -
|
|
75
|
+
01 - experimental method.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
04.. - Misc codecs
|
|
79
|
+
|
|
80
|
+
00 - Reserved
|
|
81
|
+
|
|
82
|
+
01 - [Zip]
|
|
83
|
+
00 - Copy (not used. Use {00} instead)
|
|
84
|
+
01 - Shrink
|
|
85
|
+
06 - Implode
|
|
86
|
+
08 - Deflate
|
|
87
|
+
09 - Deflate64
|
|
88
|
+
0A - Imploding
|
|
89
|
+
0C - BZip2 (not used. Use {040202} instead)
|
|
90
|
+
0E - LZMA (LZMA-zip)
|
|
91
|
+
5F - xz
|
|
92
|
+
60 - Jpeg
|
|
93
|
+
61 - WavPack
|
|
94
|
+
62 - PPMd (PPMd-zip)
|
|
95
|
+
63 - wzAES
|
|
96
|
+
|
|
97
|
+
02 -
|
|
98
|
+
02 - BZip2
|
|
99
|
+
|
|
100
|
+
03 - [Rar]
|
|
101
|
+
01 - Rar1
|
|
102
|
+
02 - Rar2
|
|
103
|
+
03 - Rar3
|
|
104
|
+
05 - Rar5
|
|
105
|
+
|
|
106
|
+
04 - [Arj]
|
|
107
|
+
01 - Arj(1,2,3)
|
|
108
|
+
02 - Arj4
|
|
109
|
+
|
|
110
|
+
05 - [Z]
|
|
111
|
+
|
|
112
|
+
06 - [Lzh]
|
|
113
|
+
|
|
114
|
+
07 - Reserved for 7z
|
|
115
|
+
|
|
116
|
+
08 - [Cab]
|
|
117
|
+
|
|
118
|
+
09 - [NSIS]
|
|
119
|
+
01 - DeflateNSIS
|
|
120
|
+
02 - BZip2NSIS
|
|
121
|
+
|
|
122
|
+
F7 - External codecs (that are not included to 7-Zip)
|
|
123
|
+
|
|
124
|
+
0x xx - reserved
|
|
125
|
+
|
|
126
|
+
10 xx - reserved (LZHAM)
|
|
127
|
+
01 - LZHAM
|
|
128
|
+
|
|
129
|
+
11 xx - reserved (Tino Reichardt)
|
|
130
|
+
01 - ZSTD
|
|
131
|
+
02 - BROTLI
|
|
132
|
+
04 - LZ4
|
|
133
|
+
05 - LZ5
|
|
134
|
+
06 - LIZARD
|
|
135
|
+
|
|
136
|
+
12 xx - reserverd (Denis Anisimov)
|
|
137
|
+
|
|
138
|
+
01 - WavPack2
|
|
139
|
+
FE - eSplitter
|
|
140
|
+
FF - RawSplitter
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
06.. - Crypto
|
|
144
|
+
|
|
145
|
+
F0 - Ciphers without hashing algo
|
|
146
|
+
|
|
147
|
+
01 - [AES]
|
|
148
|
+
0x - AES-128
|
|
149
|
+
4x - AES-192
|
|
150
|
+
8x - AES-256
|
|
151
|
+
Cx - AES
|
|
152
|
+
|
|
153
|
+
x0 - ECB
|
|
154
|
+
x1 - CBC
|
|
155
|
+
x2 - CFB
|
|
156
|
+
x3 - OFB
|
|
157
|
+
x4 - CTR
|
|
158
|
+
|
|
159
|
+
F1 - Combine Ciphers
|
|
160
|
+
|
|
161
|
+
01 - [Zip]
|
|
162
|
+
01 - ZipCrypto (Main Zip crypto algo)
|
|
163
|
+
|
|
164
|
+
03 - [RAR]
|
|
165
|
+
02 -
|
|
166
|
+
03 - Rar29AES (AES-128 + modified SHA-1)
|
|
167
|
+
|
|
168
|
+
07 - [7z]
|
|
169
|
+
01 - 7zAES (AES-256 + SHA-256)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
End of document
|