omnizip 0.4.7-arm-linux → 0.4.8-arm-linux
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/CHANGELOG.md +12 -0
- data/lib/omnizip/archive_handlers/cpio_handler.rb +8 -0
- data/lib/omnizip/archive_handlers/iso_handler.rb +8 -0
- data/lib/omnizip/archive_handlers/rar_handler.rb +8 -0
- data/lib/omnizip/archive_handlers/rpm_handler.rb +3 -0
- data/lib/omnizip/archive_handlers/seven_zip_handler.rb +8 -0
- data/lib/omnizip/archive_handlers/tar_handler.rb +9 -1
- data/lib/omnizip/archive_handlers/xar_handler.rb +8 -0
- data/lib/omnizip/backends.rb +7 -4
- data/lib/omnizip/version.rb +1 -1
- data/vendor/libomnizip_ffi.so +0 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c33726395267f8c58e77f70b4c2c3374d5faa107fd98efc233dcf8848ca4b852
|
|
4
|
+
data.tar.gz: b2946fd659192928b716e1c921e0f06ba52282af25ff03c562de6c28eda81653
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1b0a3868001348c10ee8e2e2f4bbe90dcb8a3441c491db1085801f66b59c547fbc42ac5b07fd87f05150f81a9ac60fec116ca81f53a3f2e78a75f272c9c29053
|
|
7
|
+
data.tar.gz: 0f0897eae22cac721c24ffde6e0e9db5dc85182b0eda972d0d35fe8804242fd16bc6a2dfec9871117063f9869afa0d6600da09712ff59c6225289000d748a58a
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Added
|
|
11
|
+
- Archive-level tier for every handler: tar, cpio, iso, xar, 7z and
|
|
12
|
+
rar3/4/5 (with `password:` passthrough) route list(names) and
|
|
13
|
+
read_entry through the cdylib's whole-archive surface, falling back
|
|
14
|
+
to the Ruby readers on any Rust error or a missing library. rpm
|
|
15
|
+
rides the tier for read_entry once the dylib is ≥ 0.21.111 (which
|
|
16
|
+
strips the cpio `./` prefix so its entry names match the Ruby
|
|
17
|
+
handler's); rpm list and OLE stay pure-Ruby — OLE is a pinned model
|
|
18
|
+
divergence (Ruby lists top-level entries, Rust flattens the storage
|
|
19
|
+
tree), documented in the capability matrix and pinned by the new
|
|
20
|
+
cross-implementation differential spec.
|
|
21
|
+
|
|
10
22
|
### Added
|
|
11
23
|
- Prebuilt-binary distribution (parsanol model): platform gems
|
|
12
24
|
(x86_64/aarch64/arm Linux glibc+musl, arm64/x86_64 macOS,
|
|
@@ -20,6 +20,11 @@ module Omnizip
|
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
def list(path, details: false, **_)
|
|
23
|
+
unless details
|
|
24
|
+
tier_names = Omnizip::Backends.archive_entry_names(path)
|
|
25
|
+
return tier_names if tier_names
|
|
26
|
+
end
|
|
27
|
+
|
|
23
28
|
entries = Omnizip::Formats::Cpio.list(path)
|
|
24
29
|
if details
|
|
25
30
|
entries.map do |e|
|
|
@@ -32,6 +37,9 @@ module Omnizip
|
|
|
32
37
|
end
|
|
33
38
|
|
|
34
39
|
def read_entry(path, entry_name, **_)
|
|
40
|
+
tier = Omnizip::Backends.archive_read_entry(path, entry_name)
|
|
41
|
+
return tier unless tier.nil?
|
|
42
|
+
|
|
35
43
|
entry = Omnizip::Formats::Cpio.list(path)
|
|
36
44
|
.find { |e| e.name == entry_name }
|
|
37
45
|
unless entry
|
|
@@ -20,6 +20,11 @@ module Omnizip
|
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
def list(path, details: false, **_)
|
|
23
|
+
unless details
|
|
24
|
+
tier_names = Omnizip::Backends.archive_entry_names(path)
|
|
25
|
+
return tier_names if tier_names
|
|
26
|
+
end
|
|
27
|
+
|
|
23
28
|
entries = Omnizip::Formats::Iso.list(path)
|
|
24
29
|
if details
|
|
25
30
|
entries.map do |e|
|
|
@@ -32,6 +37,9 @@ module Omnizip
|
|
|
32
37
|
end
|
|
33
38
|
|
|
34
39
|
def read_entry(path, entry_name, **_)
|
|
40
|
+
tier = Omnizip::Backends.archive_read_entry(path, entry_name)
|
|
41
|
+
return tier unless tier.nil?
|
|
42
|
+
|
|
35
43
|
entry = Omnizip::Formats::Iso.list(path)
|
|
36
44
|
.find { |e| e.full_path == entry_name }
|
|
37
45
|
unless entry
|
|
@@ -29,6 +29,11 @@ module Omnizip
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def list(path, details: false, **_)
|
|
32
|
+
unless details
|
|
33
|
+
tier_names = Omnizip::Backends.archive_entry_names(path)
|
|
34
|
+
return tier_names if tier_names
|
|
35
|
+
end
|
|
36
|
+
|
|
32
37
|
reader = Omnizip::Formats::Rar::Reader.new(path).open
|
|
33
38
|
entries = reader.list_files
|
|
34
39
|
if details
|
|
@@ -43,6 +48,9 @@ module Omnizip
|
|
|
43
48
|
end
|
|
44
49
|
|
|
45
50
|
def read_entry(path, entry_name, password: nil, **_)
|
|
51
|
+
tier = Omnizip::Backends.archive_read_entry(path, entry_name, password: password)
|
|
52
|
+
return tier unless tier.nil?
|
|
53
|
+
|
|
46
54
|
Dir.mktmpdir("omnizip-rar-entry") do |dir|
|
|
47
55
|
dest = File.join(dir, "entry")
|
|
48
56
|
Omnizip::Formats::Rar::Decompressor.extract_entry(
|
|
@@ -29,6 +29,9 @@ module Omnizip
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def read_entry(path, entry_name, **_)
|
|
32
|
+
tier = Omnizip::Backends.archive_read_entry(path, entry_name)
|
|
33
|
+
return tier unless tier.nil?
|
|
34
|
+
|
|
32
35
|
Dir.mktmpdir("omnizip-rpm-entry") do |dir|
|
|
33
36
|
Omnizip::Formats::Rpm.extract(path, dir)
|
|
34
37
|
dest = File.join(dir, entry_name)
|
|
@@ -25,6 +25,11 @@ module Omnizip
|
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
def list(path, details: false, **options)
|
|
28
|
+
unless details
|
|
29
|
+
tier_names = Omnizip::Backends.archive_entry_names(path, password: options[:password])
|
|
30
|
+
return tier_names if tier_names
|
|
31
|
+
end
|
|
32
|
+
|
|
28
33
|
with_reader(path, options) do |reader|
|
|
29
34
|
entries = reader.list_files
|
|
30
35
|
if details
|
|
@@ -40,6 +45,9 @@ module Omnizip
|
|
|
40
45
|
end
|
|
41
46
|
|
|
42
47
|
def read_entry(path, entry_name, **options)
|
|
48
|
+
tier = Omnizip::Backends.archive_read_entry(path, entry_name, password: options[:password])
|
|
49
|
+
return tier unless tier.nil?
|
|
50
|
+
|
|
43
51
|
with_reader(path, options) do |reader|
|
|
44
52
|
entry = reader.list_files.find { |e| e.name == entry_name }
|
|
45
53
|
raise Errno::ENOENT, "Entry not found: #{entry_name}" unless entry
|
|
@@ -22,6 +22,11 @@ module Omnizip
|
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def list(path, details: false, **_)
|
|
25
|
+
unless details
|
|
26
|
+
tier_names = Omnizip::Backends.archive_entry_names(path)
|
|
27
|
+
return tier_names if tier_names
|
|
28
|
+
end
|
|
29
|
+
|
|
25
30
|
entries = Omnizip::Formats::Tar.list(path)
|
|
26
31
|
if details
|
|
27
32
|
entries.map do |entry|
|
|
@@ -58,7 +63,10 @@ module Omnizip
|
|
|
58
63
|
end
|
|
59
64
|
end
|
|
60
65
|
|
|
61
|
-
def read_entry(path, entry_name)
|
|
66
|
+
def read_entry(path, entry_name, **_)
|
|
67
|
+
tier = Omnizip::Backends.archive_read_entry(path, entry_name)
|
|
68
|
+
return tier unless tier.nil?
|
|
69
|
+
|
|
62
70
|
data = nil
|
|
63
71
|
Omnizip::Formats::Tar.open(path) do |reader|
|
|
64
72
|
entry = reader.entries.find { |e| e.name == entry_name }
|
|
@@ -21,6 +21,11 @@ module Omnizip
|
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
def list(path, details: false, **_)
|
|
24
|
+
unless details
|
|
25
|
+
tier_names = Omnizip::Backends.archive_entry_names(path)
|
|
26
|
+
return tier_names if tier_names
|
|
27
|
+
end
|
|
28
|
+
|
|
24
29
|
entries = Omnizip::Formats::Xar.list(path)
|
|
25
30
|
if details
|
|
26
31
|
entries.map do |e|
|
|
@@ -33,6 +38,9 @@ module Omnizip
|
|
|
33
38
|
end
|
|
34
39
|
|
|
35
40
|
def read_entry(path, entry_name, **_)
|
|
41
|
+
tier = Omnizip::Backends.archive_read_entry(path, entry_name)
|
|
42
|
+
return tier unless tier.nil?
|
|
43
|
+
|
|
36
44
|
Dir.mktmpdir("omnizip-xar-entry") do |dir|
|
|
37
45
|
Omnizip::Formats::Xar.extract(path, dir)
|
|
38
46
|
dest = File.join(dir, entry_name)
|
data/lib/omnizip/backends.rb
CHANGED
|
@@ -96,15 +96,18 @@ module Omnizip
|
|
|
96
96
|
|
|
97
97
|
# Whole-archive tier helpers: nil means "Rust unavailable or
|
|
98
98
|
# entry not found — caller falls back to the Ruby reader".
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
# Encrypted formats (rar, 7z) pass password:.
|
|
100
|
+
def archive_entry_names(path, password: nil)
|
|
101
|
+
Omnizip::Implementations::Rust::Archive.open(File.binread(path), password: password) do |a|
|
|
102
|
+
return a.entry_names
|
|
103
|
+
end
|
|
101
104
|
rescue Omnizip::Implementations::Rust::Archive::LibraryMissing, Omnizip::Implementations::Rust::Error, StandardError
|
|
102
105
|
nil
|
|
103
106
|
end
|
|
104
107
|
|
|
105
108
|
# rubocop:disable-next Lint/ReturnInVoidContext
|
|
106
|
-
def archive_read_entry(path, entry_name)
|
|
107
|
-
Omnizip::Implementations::Rust::Archive.open(File.binread(path)) do |a|
|
|
109
|
+
def archive_read_entry(path, entry_name, password: nil)
|
|
110
|
+
Omnizip::Implementations::Rust::Archive.open(File.binread(path), password: password) do |a|
|
|
108
111
|
idx = a.entry_names.index(entry_name)
|
|
109
112
|
return nil if idx.nil?
|
|
110
113
|
|
data/lib/omnizip/version.rb
CHANGED
data/vendor/libomnizip_ffi.so
CHANGED
|
Binary file
|