EXtremeZip 2023.1.29 → 2023.1.31
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.
- checksums.yaml +4 -4
- data/lib/extremezip.zzaqsv.rb +30 -30
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b6828909fbe53e0f3b211aa554b51fdcae8dd6dc77f49f21d8d96409b352892f
|
|
4
|
+
data.tar.gz: df0f6847adc9db66ea24a997c879b62d6f1c0cb23590c7f787f9dd1f4c53e295
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 28c67deaa23056ff3aeb2fe44e9c239e671c93ef9c1d06ce7f2dfc8068a62165f9754d176297e27ae30fd83894b2e33964c122de3c56d86136eec028551d1f14
|
|
7
|
+
data.tar.gz: 80c52c54543d2295d993521c63eb38aec017cdb1ee004a849820406f39409afdb68e691148d9237fdf9b349bacf2795cd338236d8e8f40f83d69f5923848e0bf
|
data/lib/extremezip.zzaqsv.rb
CHANGED
|
@@ -92,15 +92,15 @@ class ExtremeZip
|
|
|
92
92
|
|
|
93
93
|
unless insertedFileObject # not inserted file object
|
|
94
94
|
@topFileList << (toInsertFileObject) # insert into top file list.
|
|
95
|
-
|
|
96
95
|
end # unless insertedFileObject # not inserted file object
|
|
97
96
|
|
|
98
97
|
@leastTopFileLength=@topFileList.last['file_length']
|
|
99
98
|
end # if (file_lenght>leastTopFileLength) # larger than least top file length
|
|
100
99
|
else # it is a directory
|
|
101
|
-
victoriaFresh
|
|
100
|
+
puts "victoriaFresh: #{victoriaFresh}" # debug.
|
|
101
|
+
victoriaFresh['sub_files']&.each do |sub_file| # remember sub files one by one. This might be a symbol link.
|
|
102
102
|
reportRememberOneFileNode(sub_file, "#{parentPath}/#{victoriaFresh['name']}")
|
|
103
|
-
end
|
|
103
|
+
end # victoriaFresh['sub_files']&.each do |sub_file| # remember sub files one by one. This might be a symbol link.
|
|
104
104
|
end # else # it is a directory
|
|
105
105
|
end # reportRememberOneFileNode(victoriaFresh) # process one file node
|
|
106
106
|
|
|
@@ -285,37 +285,37 @@ class ExtremeZip
|
|
|
285
285
|
|
|
286
286
|
# 写入文件内容
|
|
287
287
|
def writeFile(wholeFileContent, victoriaFresh)
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
288
|
+
extremeZipOutputFile = File.new("#{victoriaFresh['name']}.exz", 'wb') # 创建文件
|
|
289
|
+
extremeZipOutputFile.syswrite(wholeFileContent) # 写入文件
|
|
290
|
+
extremeZipOutputFile.close # 关闭文件
|
|
291
291
|
end # writeFile(wholeFileContent, victoriaFresh) #写入文件内容
|
|
292
292
|
|
|
293
293
|
# 接收压缩后的数据块列表
|
|
294
294
|
def receiveCompressedVfsDataList(processIdList, responsePipeList)
|
|
295
|
-
|
|
295
|
+
processCounter = 0 # 子进程计数器
|
|
296
296
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
#processIdList.each do |currentSubProcess|
|
|
300
|
-
compressed = receiveFromSubProcess(currentSubProcess, responsePipeList, processCounter) # 从子进程中读取数据,并终止子进程
|
|
301
|
-
|
|
302
|
-
#写入当前压缩块到文件系统中去作为缓存。陈欣
|
|
303
|
-
writeCompressBlock(compressed, processCounter) # 写入压缩块文件
|
|
304
|
-
|
|
305
|
-
blockInfo={} # 块信息
|
|
306
|
-
blockInfo['length']=compressed.length # 记录长度
|
|
307
|
-
|
|
308
|
-
puts "block length: #{blockInfo['length']}" # Debug
|
|
297
|
+
while (processCounter<@filePartAmount) # 并不是所有分块都被处理完毕了。
|
|
298
|
+
currentSubProcess=processIdList[processCounter] # 获取子进程对象
|
|
309
299
|
|
|
310
|
-
|
|
311
|
-
|
|
300
|
+
compressed = receiveFromSubProcess(currentSubProcess, responsePipeList, processCounter) # 从子进程中读取数据,并终止子进程
|
|
301
|
+
|
|
302
|
+
#写入当前压缩块到文件系统中去作为缓存。陈欣
|
|
303
|
+
writeCompressBlock(compressed, processCounter) # 写入压缩块文件
|
|
304
|
+
|
|
305
|
+
blockInfo={} # 块信息
|
|
306
|
+
blockInfo['length']=compressed.length # 记录长度
|
|
307
|
+
|
|
308
|
+
#puts "block length: #{blockInfo['length']}" # Debug
|
|
312
309
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
310
|
+
@vfsDataList << blockInfo # 加入数据块列表中
|
|
311
|
+
checkMemoryUsage(150)
|
|
312
|
+
|
|
313
|
+
processCounter += 1 # 子进程计数
|
|
314
|
+
|
|
315
|
+
if (@filePartCounter<@filePartAmount) # 还有一些分块尚未交给子进程进行处理
|
|
316
|
+
schedule1Block(@filePartCounter) # 再启动一个子进程
|
|
317
|
+
end # if (@filePartCounter<@filePartAmount) # 还有一些分块尚未交给子进程进行处理
|
|
318
|
+
end # processIdList.each do |currentSubProcess|
|
|
319
319
|
end # receiveCompressedVfsDataList # 接收压缩后的数据块列表
|
|
320
320
|
|
|
321
321
|
# 读取块文件内容
|
|
@@ -386,10 +386,10 @@ class ExtremeZip
|
|
|
386
386
|
|
|
387
387
|
currentResponsePipe = responsePipeList[processCounter] # 任务回复管道
|
|
388
388
|
|
|
389
|
-
|
|
390
|
-
|
|
389
|
+
currentCompressedVfsDataFromSubProcess = currentResponsePipe.get # 读取压缩后数据
|
|
390
|
+
#checkMemoryUsage(145)
|
|
391
391
|
|
|
392
|
-
|
|
392
|
+
Process.waitpid(currentSubProcess) # 等待该个子进程
|
|
393
393
|
|
|
394
394
|
currentCompressedVfsDataFromSubProcess
|
|
395
395
|
end # receiveFromSubProcess(currentSubProcess) # 从子进程中读取数据,并终止子进程
|
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: 2023.1.
|
|
4
|
+
version: 2023.1.31
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hxcan Cai
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-01-
|
|
11
|
+
date: 2023-01-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cod
|