EXtremeZip 2021.7.30 → 2021.8.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/exuz +9 -1
- data/bin/exz +0 -3
- data/lib/extremeunzip.zzaqsu.rb +43 -41
- metadata +11 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7b62dc9821468e67a58130b9722834776fc64562169d58bd311cb104bc8e1e7
|
4
|
+
data.tar.gz: f1db8e352f62866f9c3dacfd92e2e80a7a79438796b56f456dbfd8659191ac78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9299113acf4f48acbf3ebc7e9911df423808d9f3bd5ee18e199ed8f2135348cd56eb8196c3a2ba4b9476ec4518dee74be551689791008d9122989b8324d0cd17
|
7
|
+
data.tar.gz: 4581bfc6106c4f3d141011b0ff454555f29ca83d06f64b9ea8732903974c8c615064e0270cca9c887513813bf30d9e7f8f34321c30002d81e5450417ba1c6223
|
data/bin/exuz
CHANGED
@@ -4,9 +4,17 @@ require 'extremeunzip.zzaqsu'
|
|
4
4
|
|
5
5
|
if ARGV.empty? # 未指定命令行参数。
|
6
6
|
else # 指定了命令行参数。
|
7
|
+
returnCode = 0 # 失败
|
7
8
|
$rootPath = ARGV[0] # 记录要打包的目录树的根目录。
|
8
9
|
|
9
10
|
exuzObject = ExtremeUnZip.new # 解压对象
|
10
11
|
|
11
|
-
exuzObject.exuz($rootPath) # 解压
|
12
|
+
result = exuzObject.exuz($rootPath) # 解压
|
13
|
+
|
14
|
+
if result # 解压成功
|
15
|
+
else # 解压失败
|
16
|
+
returnCode = 1 # 失败
|
17
|
+
end #if result # 解压成功
|
18
|
+
|
19
|
+
exit returnCode # 退出
|
12
20
|
end
|
data/bin/exz
CHANGED
data/lib/extremeunzip.zzaqsu.rb
CHANGED
@@ -95,6 +95,8 @@ end # extractVfsDataWithVersion(wholeCbor, fileVersion) #根据版本号
|
|
95
95
|
class ExtremeUnZip
|
96
96
|
# 解压
|
97
97
|
def exuz(rootPath)
|
98
|
+
result = true # 解压结果
|
99
|
+
|
98
100
|
wholeFileContent = File.read(rootPath) # 最终文件内容
|
99
101
|
|
100
102
|
checkMemoryUsage(60)
|
@@ -102,49 +104,49 @@ class ExtremeUnZip
|
|
102
104
|
puts wholeFileContent.class # debug
|
103
105
|
|
104
106
|
wholeCborByteArray = wholeFileContent[4..-1] # 从第5个到末尾
|
105
|
-
checkMemoryUsage(65)
|
106
107
|
|
107
108
|
# puts wholeCborByteArray #Debug.
|
108
109
|
|
109
|
-
|
110
|
-
|
111
|
-
#
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
110
|
+
#/usr/local/share/gems/gems/EXtremeZip-2021.7.8/lib/extremeunzip.zzaqsu.rb:110:in `decode': end of buffer reached (EOFError)
|
111
|
+
|
112
|
+
begin # 可能出错。
|
113
|
+
wholeCbor = CBOR.decode(wholeCborByteArray) # 解码
|
114
|
+
|
115
|
+
fileVersion = wholeCbor['version'] # 获取版本号
|
116
|
+
|
117
|
+
if (fileVersion < 14) # 版本号过小
|
118
|
+
checkMemoryUsage(85)
|
119
|
+
puts 'file version too old' # 报告错误
|
120
|
+
else # 版本号够大
|
121
|
+
compressedVfsMenu = wholeCbor['vfsMenu'] # 获取压缩后的目录内容
|
122
|
+
|
123
|
+
checkMemoryUsage(90)
|
124
|
+
replyByteArray = LZMA.decompress(compressedVfsMenu) # 解码目录VFS字节数组内容
|
125
|
+
|
126
|
+
# puts replyByteArray #Debug
|
127
|
+
|
128
|
+
checkMemoryUsage(95)
|
129
|
+
# victoriaFreshData=extractVfsDataWithVersion(wholeCbor, fileVersion) #根据版本号,提取VFS数据内容
|
130
|
+
victoriaFreshDataFile = extractVfsDataWithVersionExternalFile(wholeCbor, fileVersion) # 根据版本号,提取VFS数据内容
|
131
|
+
|
132
|
+
# puts victoriaFreshData #Debug
|
133
|
+
|
134
|
+
checkMemoryUsage(100)
|
135
|
+
$clipDownloader = VictoriaFresh.new # 创建下载器。
|
136
|
+
|
137
|
+
$clipDownloader.releaseFilesExternalDataFile(replyByteArray, victoriaFreshDataFile) # 释放各个文件
|
138
|
+
|
139
|
+
fileToRemove = File.new(victoriaFreshDataFile) # 要删除的文件
|
140
|
+
|
141
|
+
File.delete(fileToRemove) # 删除文件
|
142
|
+
|
143
|
+
end # if (fileVersion<14) #版本号过小
|
144
|
+
|
145
|
+
result =true # 解压成功
|
146
|
+
rescue EOFError => e # 文件内容提前到末尾。一般是压缩包文件未传输完全 。
|
147
|
+
puts "Error: the exz file may be incomplete." # 报告错误。文件可能不完整。
|
148
|
+
|
149
|
+
result = false # 失败
|
150
|
+
end #begin # 可能出错。
|
149
151
|
end # def exuz(rootPath)
|
150
152
|
end # class ExtremeUnZip
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: EXtremeZip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2021.
|
4
|
+
version: 2021.8.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hxcan Cai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cod
|
@@ -70,16 +70,22 @@ dependencies:
|
|
70
70
|
name: VictoriaFreSh
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2021.5.28
|
73
76
|
- - ">="
|
74
77
|
- !ruby/object:Gem::Version
|
75
|
-
version: 2021.
|
78
|
+
version: 2021.5.28
|
76
79
|
type: :runtime
|
77
80
|
prerelease: false
|
78
81
|
version_requirements: !ruby/object:Gem::Requirement
|
79
82
|
requirements:
|
83
|
+
- - "~>"
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: 2021.5.28
|
80
86
|
- - ">="
|
81
87
|
- !ruby/object:Gem::Version
|
82
|
-
version: 2021.
|
88
|
+
version: 2021.5.28
|
83
89
|
description: Extreme zip.
|
84
90
|
email: caihuosheng@gmail.com
|
85
91
|
executables:
|
@@ -111,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
117
|
- !ruby/object:Gem::Version
|
112
118
|
version: '0'
|
113
119
|
requirements: []
|
114
|
-
rubygems_version: 3.
|
120
|
+
rubygems_version: 3.1.6
|
115
121
|
signing_key:
|
116
122
|
specification_version: 4
|
117
123
|
summary: EXtremeZip
|