omnizip 0.4.9-arm-linux → 0.4.11-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/.rubocop-oss.yml +814 -0
- data/.rubocop.yml +15 -1
- data/.rubocop_todo.yml +7 -1
- data/CHANGELOG.md +17 -0
- data/Gemfile +23 -1
- data/README.adoc +101 -1282
- data/docs/compatibility.adoc +1 -2
- data/docs/lychee.toml +1 -7
- data/lib/omnizip/algorithms/deflate/constants.rb +5 -3
- data/lib/omnizip/implementations/rust/archive.rb +9 -41
- data/lib/omnizip/implementations/rust/ffi_library.rb +127 -0
- data/lib/omnizip/implementations/rust/fiddle_library.rb +144 -0
- data/lib/omnizip/implementations/rust/library.rb +39 -104
- data/lib/omnizip/implementations/rust.rb +2 -0
- data/lib/omnizip/version.rb +1 -1
- data/lib/tasks/docs.rake +146 -0
- data/readme-docs/rar-archives.adoc +505 -0
- data/scripts/generate_rar_oracle_fixtures.rb +177 -0
- data/vendor/libomnizip_ffi.so +0 -0
- metadata +21 -74
- data/TODO.refactor/00-overview.md +0 -67
- data/TODO.refactor/01-registry-base-class.md +0 -81
- data/TODO.refactor/02-error-hierarchy.md +0 -57
- data/TODO.refactor/03-autoload-entry-point.md +0 -69
- data/TODO.refactor/04-filter-base-consolidation.md +0 -49
- data/TODO.refactor/05-send-private-methods.md +0 -64
- data/TODO.refactor/06-instance-variable-access.md +0 -69
- data/TODO.refactor/07-respond-to-replacement.md +0 -237
- data/TODO.refactor/08-spec-doubles.md +0 -27
- data/TODO.refactor/09-cli-shared-module.md +0 -35
- data/TODO.refactor/10-format-detector-ocp.md +0 -34
- data/TODO.refactor/11-convenience-decoupling.md +0 -38
- data/TODO.refactor/12-thread-safety.md +0 -8
- data/TODO.refactor/13-lutaml-model-migration.md +0 -158
- data/TODO.refactor/14-add-missing-specs.md +0 -25
- data/docs/.github/workflows/docs.yml +0 -142
- data/docs/.gitignore +0 -21
- data/docs/Gemfile +0 -13
- data/docs/README.md +0 -101
- data/docs/_config.yml +0 -112
- data/docs/comparison/feature-matrix.adoc +0 -694
- data/docs/comparison/index.adoc +0 -113
- data/docs/comparison/vs-7zip.adoc +0 -309
- data/docs/comparison/vs-peazip.adoc +0 -77
- data/docs/comparison/vs-rubyzip.adoc +0 -342
- data/docs/comparison/vs-winrar.adoc +0 -100
- data/docs/concepts/index.adoc +0 -129
- data/docs/developer/architecture.adoc +0 -256
- data/docs/developer/contributing.adoc +0 -158
- data/docs/developer/index.adoc +0 -25
- data/docs/developer/testing.adoc +0 -212
- data/docs/getting-started/basic-usage.adoc +0 -263
- data/docs/getting-started/index.adoc +0 -42
- data/docs/getting-started/installation.adoc +0 -138
- data/docs/getting-started/quick-start.adoc +0 -183
- data/docs/getting-started/your-first-archive.adoc +0 -219
- data/docs/guides/advanced-features/encryption.adoc +0 -277
- data/docs/guides/advanced-features/index.adoc +0 -59
- data/docs/guides/advanced-features/parallel-processing.adoc +0 -144
- data/docs/guides/advanced-features/progress-tracking.adoc +0 -124
- data/docs/guides/advanced-features/streaming.adoc +0 -142
- data/docs/guides/archive-formats/gzip-format.adoc +0 -105
- data/docs/guides/archive-formats/index.adoc +0 -160
- data/docs/guides/archive-formats/ole-format.adoc +0 -151
- data/docs/guides/archive-formats/rar-format.adoc +0 -104
- data/docs/guides/archive-formats/rar5.adoc +0 -521
- data/docs/guides/archive-formats/rpm-format.adoc +0 -108
- data/docs/guides/archive-formats/seven-zip-format.adoc +0 -35
- data/docs/guides/archive-formats/tar-format.adoc +0 -106
- data/docs/guides/archive-formats/xz-format.adoc +0 -118
- data/docs/guides/archive-formats/zip-format.adoc +0 -35
- data/docs/guides/compression-algorithms/bzip2.adoc +0 -114
- data/docs/guides/compression-algorithms/deflate.adoc +0 -313
- data/docs/guides/compression-algorithms/index.adoc +0 -190
- data/docs/guides/compression-algorithms/lzma.adoc +0 -394
- data/docs/guides/compression-algorithms/lzma2.adoc +0 -244
- data/docs/guides/compression-algorithms/ppmd.adoc +0 -313
- data/docs/guides/compression-algorithms/zstandard.adoc +0 -296
- data/docs/guides/creating-archives.adoc +0 -348
- data/docs/guides/extracting-archives.adoc +0 -53
- data/docs/guides/format-conversion.adoc +0 -64
- data/docs/guides/index.adoc +0 -49
- data/docs/guides/migration-rubyzip.adoc +0 -217
- data/docs/guides/parity-archives.adoc +0 -605
- data/docs/guides/performance-tuning.adoc +0 -88
- data/docs/index.adoc +0 -228
- data/docs/reference/api/overview.adoc +0 -187
- data/docs/reference/cli/compress-command.adoc +0 -114
- data/docs/reference/cli/overview.adoc +0 -140
- data/docs/reference/index.adoc +0 -26
- data/docs/resources/faq.adoc +0 -185
- data/docs/resources/quick-reference.adoc +0 -222
- data/docs/troubleshooting/index.adoc +0 -207
|
@@ -1,342 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Omnizip vs rubyzip
|
|
3
|
-
nav_order: 2
|
|
4
|
-
parent: Comparison
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
== Omnizip vs rubyzip
|
|
8
|
-
|
|
9
|
-
Detailed comparison between Omnizip and the popular rubyzip gem.
|
|
10
|
-
|
|
11
|
-
== Overview
|
|
12
|
-
|
|
13
|
-
Both Omnizip and rubyzip are pure Ruby libraries for working with ZIP archives. Omnizip provides rubyzip compatibility while adding support for additional formats and compression algorithms.
|
|
14
|
-
|
|
15
|
-
== Key Differences
|
|
16
|
-
|
|
17
|
-
=== Format Support
|
|
18
|
-
|
|
19
|
-
**Omnizip:**
|
|
20
|
-
|
|
21
|
-
* ZIP format (read/write)
|
|
22
|
-
* 7z format (read/write)
|
|
23
|
-
* RAR format (read-only)
|
|
24
|
-
* TAR format (read/write)
|
|
25
|
-
* ISO format (read-only)
|
|
26
|
-
|
|
27
|
-
**rubyzip:**
|
|
28
|
-
|
|
29
|
-
* ZIP format only (read/write)
|
|
30
|
-
|
|
31
|
-
=== Compression Algorithms
|
|
32
|
-
|
|
33
|
-
**Omnizip:**
|
|
34
|
-
|
|
35
|
-
* LZMA/LZMA2
|
|
36
|
-
* BZip2
|
|
37
|
-
* PPMd7/PPMd8
|
|
38
|
-
* Deflate
|
|
39
|
-
* Deflate64
|
|
40
|
-
* Zstandard
|
|
41
|
-
|
|
42
|
-
**rubyzip:**
|
|
43
|
-
|
|
44
|
-
* Deflate only
|
|
45
|
-
|
|
46
|
-
=== API Compatibility
|
|
47
|
-
|
|
48
|
-
Omnizip provides **100% rubyzip API compatibility** via the compatibility layer:
|
|
49
|
-
|
|
50
|
-
[source,ruby]
|
|
51
|
-
----
|
|
52
|
-
require 'omnizip/rubyzip_compat'
|
|
53
|
-
|
|
54
|
-
# Use identical rubyzip syntax
|
|
55
|
-
Zip::File.open('archive.zip', create: true) do |zip|
|
|
56
|
-
zip.add('file.txt', 'source.txt')
|
|
57
|
-
end
|
|
58
|
-
----
|
|
59
|
-
|
|
60
|
-
== Feature Comparison
|
|
61
|
-
|
|
62
|
-
[cols="40,30,30",options="header"]
|
|
63
|
-
|===
|
|
64
|
-
|Feature |Omnizip |rubyzip
|
|
65
|
-
|
|
66
|
-
|ZIP Format
|
|
67
|
-
|✅
|
|
68
|
-
|✅
|
|
69
|
-
|
|
70
|
-
|7z Format
|
|
71
|
-
|✅
|
|
72
|
-
|❌
|
|
73
|
-
|
|
74
|
-
|Deflate Compression
|
|
75
|
-
|✅
|
|
76
|
-
|✅
|
|
77
|
-
|
|
78
|
-
|Deflate64 Compression
|
|
79
|
-
|✅
|
|
80
|
-
|❌
|
|
81
|
-
|
|
82
|
-
|LZMA Compression
|
|
83
|
-
|✅
|
|
84
|
-
|❌
|
|
85
|
-
|
|
86
|
-
|BZip2 Compression
|
|
87
|
-
|✅
|
|
88
|
-
|❌
|
|
89
|
-
|
|
90
|
-
|AES Encryption
|
|
91
|
-
|✅
|
|
92
|
-
|✅
|
|
93
|
-
|
|
94
|
-
|ZIP64 Support
|
|
95
|
-
|✅
|
|
96
|
-
|✅
|
|
97
|
-
|
|
98
|
-
|Streaming
|
|
99
|
-
|✅
|
|
100
|
-
|✅
|
|
101
|
-
|
|
102
|
-
|Rubyzip API
|
|
103
|
-
|✅ (via compat)
|
|
104
|
-
|✅
|
|
105
|
-
|
|
106
|
-
|Native API
|
|
107
|
-
|✅
|
|
108
|
-
|N/A
|
|
109
|
-
|
|
110
|
-
|CLI Tool
|
|
111
|
-
|✅
|
|
112
|
-
|❌
|
|
113
|
-
|
|
114
|
-
|Pure Ruby
|
|
115
|
-
|✅
|
|
116
|
-
|✅
|
|
117
|
-
|
|
118
|
-
|No Dependencies
|
|
119
|
-
|✅
|
|
120
|
-
|✅
|
|
121
|
-
|
|
122
|
-
|===
|
|
123
|
-
|
|
124
|
-
== Migration from rubyzip
|
|
125
|
-
|
|
126
|
-
=== Step 1: Install Omnizip
|
|
127
|
-
|
|
128
|
-
[source,ruby]
|
|
129
|
-
----
|
|
130
|
-
# Gemfile
|
|
131
|
-
gem 'omnizip'
|
|
132
|
-
----
|
|
133
|
-
|
|
134
|
-
=== Step 2: Update Requires
|
|
135
|
-
|
|
136
|
-
Change:
|
|
137
|
-
|
|
138
|
-
[source,ruby]
|
|
139
|
-
----
|
|
140
|
-
require 'zip'
|
|
141
|
-
----
|
|
142
|
-
|
|
143
|
-
To:
|
|
144
|
-
|
|
145
|
-
[source,ruby]
|
|
146
|
-
----
|
|
147
|
-
require 'omnizip/rubyzip_compat'
|
|
148
|
-
----
|
|
149
|
-
|
|
150
|
-
=== Step 3: Run Tests
|
|
151
|
-
|
|
152
|
-
Your existing rubyzip code should work without changes!
|
|
153
|
-
|
|
154
|
-
== Code Examples
|
|
155
|
-
|
|
156
|
-
=== Creating Archives
|
|
157
|
-
|
|
158
|
-
**rubyzip:**
|
|
159
|
-
|
|
160
|
-
[source,ruby]
|
|
161
|
-
----
|
|
162
|
-
require 'zip'
|
|
163
|
-
|
|
164
|
-
Zip::File.open('archive.zip', create: true) do |zip|
|
|
165
|
-
zip.add('file.txt', 'source.txt')
|
|
166
|
-
end
|
|
167
|
-
----
|
|
168
|
-
|
|
169
|
-
**Omnizip (compatible):**
|
|
170
|
-
|
|
171
|
-
[source,ruby]
|
|
172
|
-
----
|
|
173
|
-
require 'omnizip/rubyzip_compat'
|
|
174
|
-
|
|
175
|
-
Zip::File.open('archive.zip', create: true) do |zip|
|
|
176
|
-
zip.add('file.txt', 'source.txt')
|
|
177
|
-
end
|
|
178
|
-
----
|
|
179
|
-
|
|
180
|
-
**Omnizip (native):**
|
|
181
|
-
|
|
182
|
-
[source,ruby]
|
|
183
|
-
----
|
|
184
|
-
require 'omnizip'
|
|
185
|
-
|
|
186
|
-
Omnizip::Archive.create('archive.zip') do |archive|
|
|
187
|
-
archive.add_file('source.txt', 'file.txt')
|
|
188
|
-
end
|
|
189
|
-
----
|
|
190
|
-
|
|
191
|
-
=== Reading Archives
|
|
192
|
-
|
|
193
|
-
**rubyzip:**
|
|
194
|
-
|
|
195
|
-
[source,ruby]
|
|
196
|
-
----
|
|
197
|
-
require 'zip'
|
|
198
|
-
|
|
199
|
-
Zip::File.open('archive.zip') do |zip|
|
|
200
|
-
content = zip.read('file.txt')
|
|
201
|
-
end
|
|
202
|
-
----
|
|
203
|
-
|
|
204
|
-
**Omnizip (compatible):**
|
|
205
|
-
|
|
206
|
-
[source,ruby]
|
|
207
|
-
----
|
|
208
|
-
require 'omnizip/rubyzip_compat'
|
|
209
|
-
|
|
210
|
-
Zip::File.open('archive.zip') do |zip|
|
|
211
|
-
content = zip.read('file.txt')
|
|
212
|
-
end
|
|
213
|
-
----
|
|
214
|
-
|
|
215
|
-
**Omnizip (native):**
|
|
216
|
-
|
|
217
|
-
[source,ruby]
|
|
218
|
-
----
|
|
219
|
-
require 'omnizip'
|
|
220
|
-
|
|
221
|
-
content = Omnizip.read_from_archive('archive.zip', 'file.txt')
|
|
222
|
-
----
|
|
223
|
-
|
|
224
|
-
== Advanced Features in Omnizip
|
|
225
|
-
|
|
226
|
-
=== 7-Zip Archives
|
|
227
|
-
|
|
228
|
-
[source,ruby]
|
|
229
|
-
----
|
|
230
|
-
require 'omnizip'
|
|
231
|
-
|
|
232
|
-
# Create 7z archive with LZMA2
|
|
233
|
-
Omnizip::Archive.create('backup.7z', format: :seven_zip) do |archive|
|
|
234
|
-
archive.add_directory('data/')
|
|
235
|
-
end
|
|
236
|
-
----
|
|
237
|
-
|
|
238
|
-
=== Better Compression
|
|
239
|
-
|
|
240
|
-
[source,ruby]
|
|
241
|
-
----
|
|
242
|
-
require 'omnizip'
|
|
243
|
-
|
|
244
|
-
# Use Deflate64 for better compression
|
|
245
|
-
Omnizip.compress_file(
|
|
246
|
-
'large_file.txt',
|
|
247
|
-
'output.zip',
|
|
248
|
-
algorithm: :deflate64,
|
|
249
|
-
level: 9
|
|
250
|
-
)
|
|
251
|
-
----
|
|
252
|
-
|
|
253
|
-
=== Multiple Algorithms
|
|
254
|
-
|
|
255
|
-
[source,ruby]
|
|
256
|
-
----
|
|
257
|
-
require 'omnizip'
|
|
258
|
-
|
|
259
|
-
# Try different algorithms
|
|
260
|
-
[:lzma, :bzip2, :deflate64].each do |alg|
|
|
261
|
-
Omnizip.compress_file('file.txt', "output.#{alg}", algorithm: alg)
|
|
262
|
-
end
|
|
263
|
-
----
|
|
264
|
-
|
|
265
|
-
== Performance Comparison
|
|
266
|
-
|
|
267
|
-
Both libraries are pure Ruby implementations with similar performance characteristics:
|
|
268
|
-
|
|
269
|
-
**Compression Speed:**
|
|
270
|
-
|
|
271
|
-
* Omnizip: ~50-100 KB/s (Deflate)
|
|
272
|
-
* rubyzip: ~50-100 KB/s (Deflate)
|
|
273
|
-
|
|
274
|
-
**Memory Usage:**
|
|
275
|
-
|
|
276
|
-
* Similar for ZIP operations
|
|
277
|
-
* Omnizip uses more memory for LZMA (larger dictionary)
|
|
278
|
-
|
|
279
|
-
**Compatibility:**
|
|
280
|
-
|
|
281
|
-
* Both maintain excellent ZIP compatibility
|
|
282
|
-
* Omnizip adds 7-Zip compatibility
|
|
283
|
-
|
|
284
|
-
== When to Use Each
|
|
285
|
-
|
|
286
|
-
=== Choose Omnizip When
|
|
287
|
-
|
|
288
|
-
* You need 7-Zip format support
|
|
289
|
-
* You want better compression (LZMA, Deflate64)
|
|
290
|
-
* You need multiple compression algorithms
|
|
291
|
-
* You want a CLI tool
|
|
292
|
-
* You're starting a new project
|
|
293
|
-
* You want advanced features
|
|
294
|
-
|
|
295
|
-
=== Choose rubyzip When
|
|
296
|
-
|
|
297
|
-
* You only need basic ZIP operations
|
|
298
|
-
* You have an existing rubyzip codebase
|
|
299
|
-
* You want the most mature solution
|
|
300
|
-
* Simplicity is the priority
|
|
301
|
-
|
|
302
|
-
== Migration Checklist
|
|
303
|
-
|
|
304
|
-
- [ ] Install Omnizip gem
|
|
305
|
-
- [ ] Update require statements
|
|
306
|
-
- [ ] Run test suite
|
|
307
|
-
- [ ] Verify archive compatibility
|
|
308
|
-
- [ ] Test error handling
|
|
309
|
-
- [ ] Update documentation
|
|
310
|
-
- [ ] Deploy to staging
|
|
311
|
-
- [ ] Monitor performance
|
|
312
|
-
|
|
313
|
-
== Compatibility Notes
|
|
314
|
-
|
|
315
|
-
=== Fully Compatible
|
|
316
|
-
|
|
317
|
-
* `Zip::File` operations
|
|
318
|
-
* `Zip::Entry` methods
|
|
319
|
-
* `Zip::InputStream`
|
|
320
|
-
* `Zip::OutputStream`
|
|
321
|
-
* Error classes
|
|
322
|
-
* Archive creation/extraction
|
|
323
|
-
|
|
324
|
-
=== Enhanced in Omnizip
|
|
325
|
-
|
|
326
|
-
* Additional compression algorithms
|
|
327
|
-
* 7-Zip format support
|
|
328
|
-
* Better error messages
|
|
329
|
-
* CLI tool included
|
|
330
|
-
* Performance profiling
|
|
331
|
-
|
|
332
|
-
=== Migration Resources
|
|
333
|
-
|
|
334
|
-
* link:../guides/migration-rubyzip.html[Detailed Migration Guide]
|
|
335
|
-
* link:../reference/api/overview.html[Omnizip Ruby API]
|
|
336
|
-
* link:../getting-started/quick-start.html[Quick Start Tutorial]
|
|
337
|
-
|
|
338
|
-
== See Also
|
|
339
|
-
|
|
340
|
-
* link:feature-matrix.html[Complete Feature Matrix]
|
|
341
|
-
* link:../guides/migration-rubyzip.html[Migration Guide]
|
|
342
|
-
* link:../reference/api/overview.html[Ruby API Reference]
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Omnizip vs WinRAR
|
|
3
|
-
nav_order: 4
|
|
4
|
-
parent: Comparison
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
== Omnizip vs WinRAR
|
|
8
|
-
|
|
9
|
-
Comparison between Omnizip and the commercial WinRAR utility.
|
|
10
|
-
|
|
11
|
-
== Overview
|
|
12
|
-
|
|
13
|
-
WinRAR is a commercial Windows archiving tool with proprietary RAR format support. Omnizip is an open-source pure Ruby library focused on cross-platform compression.
|
|
14
|
-
|
|
15
|
-
== Key Differences
|
|
16
|
-
|
|
17
|
-
[cols="40,30,30",options="header"]
|
|
18
|
-
|===
|
|
19
|
-
|Aspect |Omnizip |WinRAR
|
|
20
|
-
|
|
21
|
-
|License
|
|
22
|
-
|LGPL 2.1 (Open Source)
|
|
23
|
-
|Proprietary (Paid)
|
|
24
|
-
|
|
25
|
-
|Platform
|
|
26
|
-
|Cross-platform (Ruby)
|
|
27
|
-
|Windows primary
|
|
28
|
-
|
|
29
|
-
|Implementation
|
|
30
|
-
|Pure Ruby
|
|
31
|
-
|C++ (native)
|
|
32
|
-
|
|
33
|
-
|RAR Write Support
|
|
34
|
-
|❌
|
|
35
|
-
|✅
|
|
36
|
-
|
|
37
|
-
|RAR Read Support
|
|
38
|
-
|✅
|
|
39
|
-
|✅
|
|
40
|
-
|
|
41
|
-
|7z Format
|
|
42
|
-
|✅
|
|
43
|
-
|✅
|
|
44
|
-
|
|
45
|
-
|ZIP Format
|
|
46
|
-
|✅
|
|
47
|
-
|✅
|
|
48
|
-
|
|
49
|
-
|API Integration
|
|
50
|
-
|Ruby API
|
|
51
|
-
|CLI only
|
|
52
|
-
|
|
53
|
-
|GUI
|
|
54
|
-
|❌
|
|
55
|
-
|✅
|
|
56
|
-
|
|
57
|
-
|===
|
|
58
|
-
|
|
59
|
-
== Format Support Comparison
|
|
60
|
-
|
|
61
|
-
**Omnizip:**
|
|
62
|
-
|
|
63
|
-
* ZIP (read/write)
|
|
64
|
-
* 7z (read/write)
|
|
65
|
-
* RAR (read-only)
|
|
66
|
-
* TAR (read/write)
|
|
67
|
-
* ISO (read-only)
|
|
68
|
-
|
|
69
|
-
**WinRAR:**
|
|
70
|
-
|
|
71
|
-
* RAR (read/write) - Proprietary
|
|
72
|
-
* ZIP (read/write)
|
|
73
|
-
* 7z (read/write)
|
|
74
|
-
* TAR, GZ, BZ2, XZ, etc.
|
|
75
|
-
* Many archive formats
|
|
76
|
-
|
|
77
|
-
== When to Choose Each
|
|
78
|
-
|
|
79
|
-
=== Choose Omnizip When
|
|
80
|
-
|
|
81
|
-
* Need open-source solution
|
|
82
|
-
* Ruby application integration
|
|
83
|
-
* Cross-platform deployment
|
|
84
|
-
* No licensing costs
|
|
85
|
-
* RAR read-only sufficient
|
|
86
|
-
* Programmatic control needed
|
|
87
|
-
|
|
88
|
-
=== Choose WinRAR When
|
|
89
|
-
|
|
90
|
-
* Need RAR format creation
|
|
91
|
-
* Windows-centric environment
|
|
92
|
-
* GUI required
|
|
93
|
-
* Commercial support needed
|
|
94
|
-
* Advanced recovery features
|
|
95
|
-
* Maximum compatibility
|
|
96
|
-
|
|
97
|
-
== See Also
|
|
98
|
-
|
|
99
|
-
* link:feature-matrix.html[Feature Comparison Matrix]
|
|
100
|
-
* link:vs-7zip.html[Omnizip vs 7-Zip]
|
data/docs/concepts/index.adoc
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Core Concepts
|
|
3
|
-
nav_order: 40
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
== Core Concepts
|
|
7
|
-
|
|
8
|
-
Understanding the fundamental concepts behind Omnizip's architecture.
|
|
9
|
-
|
|
10
|
-
=== Registry-Based Architecture
|
|
11
|
-
|
|
12
|
-
Omnizip uses a registry pattern for extensibility:
|
|
13
|
-
|
|
14
|
-
==== Algorithm Registry
|
|
15
|
-
|
|
16
|
-
Manages compression algorithms:
|
|
17
|
-
|
|
18
|
-
[source,ruby]
|
|
19
|
-
----
|
|
20
|
-
# List algorithms
|
|
21
|
-
Omnizip::AlgorithmRegistry.registered
|
|
22
|
-
|
|
23
|
-
# Get algorithm
|
|
24
|
-
algorithm = Omnizip::AlgorithmRegistry.get(:lzma2).new(level: 9)
|
|
25
|
-
|
|
26
|
-
# Register custom algorithm
|
|
27
|
-
Omnizip::AlgorithmRegistry.register(:custom, CustomAlgorithm)
|
|
28
|
-
----
|
|
29
|
-
|
|
30
|
-
==== Filter Registry
|
|
31
|
-
|
|
32
|
-
Manages preprocessing filters:
|
|
33
|
-
|
|
34
|
-
[source,ruby]
|
|
35
|
-
----
|
|
36
|
-
# List filters
|
|
37
|
-
Omnizip::FilterRegistry.registered
|
|
38
|
-
|
|
39
|
-
# Get filter
|
|
40
|
-
filter = Omnizip::FilterRegistry.get(:bcj_x86).new
|
|
41
|
-
----
|
|
42
|
-
|
|
43
|
-
==== Format Registry
|
|
44
|
-
|
|
45
|
-
Manages archive formats:
|
|
46
|
-
|
|
47
|
-
[source,ruby]
|
|
48
|
-
----
|
|
49
|
-
# List formats
|
|
50
|
-
Omnizip::FormatRegistry.registered
|
|
51
|
-
|
|
52
|
-
# Get format
|
|
53
|
-
format = Omnizip::FormatRegistry.get(:seven_zip)
|
|
54
|
-
----
|
|
55
|
-
|
|
56
|
-
=== Compression Pipeline
|
|
57
|
-
|
|
58
|
-
Omnizip's compression process:
|
|
59
|
-
|
|
60
|
-
. **Input** - Raw data stream
|
|
61
|
-
. **Filter Chain** - Optional preprocessing (BCJ, Delta)
|
|
62
|
-
. **Compression** - Algorithm compression (LZMA2, etc.)
|
|
63
|
-
. **Archive Container** - Format packaging (7z, ZIP)
|
|
64
|
-
. **Output** - Compressed archive
|
|
65
|
-
|
|
66
|
-
=== Solid Compression
|
|
67
|
-
|
|
68
|
-
Solid archives use a shared dictionary across multiple files:
|
|
69
|
-
|
|
70
|
-
* **Advantage**: 10-30% better compression for similar files
|
|
71
|
-
* **Disadvantage**: Cannot extract individual files independently
|
|
72
|
-
* **Best for**: Source code, text documents, log files
|
|
73
|
-
|
|
74
|
-
=== Multi-Volume Archives
|
|
75
|
-
|
|
76
|
-
Split large archives across multiple files:
|
|
77
|
-
|
|
78
|
-
* **Naming**: archive.7z.001, archive.7z.002, etc.
|
|
79
|
-
* **Use case**: Large files, optical media, file size limits
|
|
80
|
-
* **Extraction**: Automatic from any volume
|
|
81
|
-
|
|
82
|
-
=== Encryption
|
|
83
|
-
|
|
84
|
-
Omnizip supports AES-256 encryption:
|
|
85
|
-
|
|
86
|
-
* **7z**: Header + file encryption
|
|
87
|
-
* **RAR5**: File-only encryption
|
|
88
|
-
* **Algorithm**: AES-256-CBC with PBKDF2 key derivation
|
|
89
|
-
|
|
90
|
-
=== Checksums
|
|
91
|
-
|
|
92
|
-
Integrity verification:
|
|
93
|
-
|
|
94
|
-
* **CRC32**: Fast, common checksum
|
|
95
|
-
* **CRC64**: More reliable for large files
|
|
96
|
-
* **SHA256**: Cryptographic verification
|
|
97
|
-
* **BLAKE2sp**: Fast, secure checksum
|
|
98
|
-
|
|
99
|
-
=== Compression Algorithms
|
|
100
|
-
|
|
101
|
-
==== Dictionary-Based (LZMA/LZMA2)
|
|
102
|
-
|
|
103
|
-
* Sliding window dictionary
|
|
104
|
-
* Range encoding for probabilities
|
|
105
|
-
* High compression ratios
|
|
106
|
-
|
|
107
|
-
==== Statistical (BZip2)
|
|
108
|
-
|
|
109
|
-
* Burrows-Wheeler Transform
|
|
110
|
-
* Move-to-Front coding
|
|
111
|
-
* Huffman encoding
|
|
112
|
-
|
|
113
|
-
==== Context Modeling (PPMd)
|
|
114
|
-
|
|
115
|
-
* Prediction by Partial Matching
|
|
116
|
-
* Context-based probability models
|
|
117
|
-
* Excellent for text
|
|
118
|
-
|
|
119
|
-
==== Dictionary + Huffman (Deflate)
|
|
120
|
-
|
|
121
|
-
* LZ77 sliding window
|
|
122
|
-
* Huffman coding
|
|
123
|
-
* ZIP-compatible
|
|
124
|
-
|
|
125
|
-
=== See Also
|
|
126
|
-
|
|
127
|
-
* link:../developer/architecture[Architecture Details]
|
|
128
|
-
* link:../guides/compression-algorithms/[Algorithm Guides]
|
|
129
|
-
* link:../guides/archive-formats/[Format Guides]
|