EXtremeZip 2023.1.29 → 2023.5.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/extremezip.zzaqsv.rb +35 -35
  3. metadata +7 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 60ef4ba8a8aceb8f6be2cfb73bc763b98a293af4016429d02f49d588f2240f82
4
- data.tar.gz: 82cc59f0b151bb1826e285a72e33bebfc3d9d0b110ffd6d41d08c96a6aedb08b
3
+ metadata.gz: 033e187266ec5cf6a1ad28b932b2ed35e20308d91587d788fe1aff75fab449ca
4
+ data.tar.gz: df2acbcb8d524099b9a639a6f1eddf29c541adf06697370681d881e474ac73a3
5
5
  SHA512:
6
- metadata.gz: 3b40ef64705493182c4e4dada135361fa02109bc20ac0763e598a18f9f052909a5290061b37ce46fb53d65b12cc25aa3f1e47a0fe9c5453a785d5dec0ef90865
7
- data.tar.gz: 8f86b1fe790d74cb1e0a2b251c13a5a3324a293e16d9e9cc90571358eab54d74259cf32bf287b3d9be21789b9e907951c27fe2762135df51eb836c56b3ca967a
6
+ metadata.gz: 84cc6494dd232768215697e8215092815d32484ab8f143d4693717260335b3a6348f66c817a9431b7bbfddb4d3949b6abf1014416854cd2bc09d0be3d059aad6
7
+ data.tar.gz: a9d7af86c06878d098658dfcee296ff0c4b938ff1925514bbbf0983f58d141d7a70c90b71f664f564b35d6c713a5443f18b9549edb7684a3ff91243c75ddc30a
@@ -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['sub_files'].each do |sub_file|
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,50 +285,50 @@ class ExtremeZip
285
285
 
286
286
  # 写入文件内容
287
287
  def writeFile(wholeFileContent, victoriaFresh)
288
- extremeZipOutputFile = File.new("#{victoriaFresh['name']}.exz", 'wb') # 创建文件
289
- extremeZipOutputFile.syswrite(wholeFileContent) # 写入文件
290
- extremeZipOutputFile.close # 关闭文件
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
- processCounter = 0 # 子进程计数器
295
+ processCounter = 0 # 子进程计数器
296
296
 
297
- while (processCounter<@filePartAmount) # 并不是所有分块都被处理完毕了。
298
- currentSubProcess=processIdList[processCounter] # 获取子进程对象
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
- @vfsDataList << blockInfo # 加入数据块列表中
311
- checkMemoryUsage(150)
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
- processCounter += 1 # 子进程计数
314
-
315
- if (@filePartCounter<@filePartAmount) # 还有一些分块尚未交给子进程进行处理
316
- schedule1Block(@filePartCounter) # 再启动一个子进程
317
- end # if (@filePartCounter<@filePartAmount) # 还有一些分块尚未交给子进程进行处理
318
- end # processIdList.each do |currentSubProcess|
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
  # 读取块文件内容
322
322
  def readBlockFile(filePartCounter)
323
- currentBlockFile = File.new(@clipDownloader.diskFileName + filePartCounter.to_s, 'rb') # 打开文件
323
+ currentBlockFile = File.new(@clipDownloader.diskFileName + filePartCounter.to_s + '.v', 'rb') # 打开文件
324
324
 
325
- currentBlockData = currentBlockFile.read # 读取全部内容
325
+ currentBlockData = currentBlockFile.read # 读取全部内容
326
326
 
327
- currentBlockFile.close # 关闭文件
327
+ currentBlockFile.close # 关闭文件
328
328
 
329
- File.delete(currentBlockFile) # 删除数据块文件
329
+ File.delete(currentBlockFile) # 删除数据块文件
330
330
 
331
- currentBlockData
331
+ currentBlockData
332
332
  end
333
333
 
334
334
  # 计划一个块的压缩计算
@@ -386,10 +386,10 @@ class ExtremeZip
386
386
 
387
387
  currentResponsePipe = responsePipeList[processCounter] # 任务回复管道
388
388
 
389
- currentCompressedVfsDataFromSubProcess = currentResponsePipe.get # 读取压缩后数据
390
- checkMemoryUsage(145)
389
+ currentCompressedVfsDataFromSubProcess = currentResponsePipe.get # 读取压缩后数据
390
+ #checkMemoryUsage(145)
391
391
 
392
- Process.waitpid(currentSubProcess) # 等待该个子进程
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.29
4
+ version: 2023.5.25
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-29 00:00:00.000000000 Z
11
+ date: 2023-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cod
@@ -86,20 +86,20 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 2022.2.24
89
+ version: 2023.5.25
90
90
  - - ">="
91
91
  - !ruby/object:Gem::Version
92
- version: 2022.2.24
92
+ version: 2023.5.25
93
93
  type: :runtime
94
94
  prerelease: false
95
95
  version_requirements: !ruby/object:Gem::Requirement
96
96
  requirements:
97
97
  - - "~>"
98
98
  - !ruby/object:Gem::Version
99
- version: 2022.2.24
99
+ version: 2023.5.25
100
100
  - - ">="
101
101
  - !ruby/object:Gem::Version
102
- version: 2022.2.24
102
+ version: 2023.5.25
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: hx_cbor
105
105
  requirement: !ruby/object:Gem::Requirement
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  - !ruby/object:Gem::Version
146
146
  version: '0'
147
147
  requirements: []
148
- rubygems_version: 3.2.33
148
+ rubygems_version: 3.3.26
149
149
  signing_key:
150
150
  specification_version: 4
151
151
  summary: EXtremeZip