「Lrzip」の版間の差分
(ページの作成:「{{Lowercase title}} Category:データ圧縮とアーカイブ en:Lrzip [https://github.com/ckolivas/lrzip Long Range ZIP] (別名 Lzma RZIP) は巨大なファ...」) |
(英語版と同期 (未訳部分そのまま)) |
||
12行目: | 12行目: | ||
=== 圧縮 === |
=== 圧縮 === |
||
− | ディレクトリを (再帰的に) 圧縮するには ''lrztar'' が必要です。最初にディレクトリが tar でまとめられてから圧縮されます。''tar'' で ''gzip'' や ''xz'' を使って圧縮するのと同じです ({{ic|tar zcf ...}} または {{ic|tar Jcz ...}})。 |
+ | ディレクトリを (再帰的に) 圧縮するには ''lrztar'' が必要です。最初にディレクトリが tar でまとめられてから圧縮されます。''tar'' で ''gzip'' や ''xz'' を使って圧縮するのと同じです ({{ic|tar zcf ...}} または {{ic|tar Jcz ...}})。なお、rzip と同様に、事前の圧縮処理の後に圧縮アルゴリズムが適用され、例えば一般的な LZMA 圧縮アーカイブとは異なります。 |
{{ic|foo}} という名前のディレクトリから [[Wikipedia:LZMA|LZMA]] で圧縮されたアーカイブ {{ic|foo.tar.lrz}} を作成するには: |
{{ic|foo}} という名前のディレクトリから [[Wikipedia:LZMA|LZMA]] で圧縮されたアーカイブ {{ic|foo.tar.lrz}} を作成するには: |
||
53行目: | 53行目: | ||
The unique feature of lrzip is that it tries to make the most of the available ram in your system at all times for maximum benefit. It does this by default, choosing the largest sized window possible without running out of memory. It also has a unique "sliding mmap" feature which makes it possible to even use a compression window larger than your ramsize, if the file is that large. It does this (with the {{ic|-U}} option) by implementing one large mmap buffer as per normal, and a smaller moving buffer to track which part of the file is currently being examined, emulating a much larger single mmapped buffer. Unfortunately, this mode can be many times slower. |
The unique feature of lrzip is that it tries to make the most of the available ram in your system at all times for maximum benefit. It does this by default, choosing the largest sized window possible without running out of memory. It also has a unique "sliding mmap" feature which makes it possible to even use a compression window larger than your ramsize, if the file is that large. It does this (with the {{ic|-U}} option) by implementing one large mmap buffer as per normal, and a smaller moving buffer to track which part of the file is currently being examined, emulating a much larger single mmapped buffer. Unfortunately, this mode can be many times slower. |
||
− | == |
+ | == 参照 == |
+ | * [https://github.com/ckolivas/lrzip GitHub リポジトリ] |
||
− | ソースに含まれている [http://ck.kolivas.org/apps/lrzip/README.benchmarks README.benchmarks] を見てください。 |
||
+ | * [http://ck.kolivas.org/apps/lrzip/README.benchmarks 著者によるベンチマーク] |
||
− | |||
− | == FAQ == |
||
− | |||
− | ソースパッケージに含まれている [http://ck.kolivas.org/apps/lrzip/README README] を見てください。 |
||
− | |||
− | == リポジトリとイシュートラッカー == |
||
− | |||
− | * https://github.com/ckolivas/lrzip |
2019年5月5日 (日) 16:15時点における版
Long Range ZIP (別名 Lzma RZIP) は巨大なファイルに最適化された圧縮プログラムです。冗長性を排除する rzip と通常の圧縮 (LZMA, LZO, gzip, bzip2, ZPAQ) を組み合わせることにより、ファイルが巨大になればなるほど、高い圧縮パフォーマンスを得ることができます。特に 100MB 以上のファイルで高い効果があります。サイズを小さくするか圧縮速度を速くするかどちらかを選ぶことが可能です。
インストール
使用方法
圧縮
ディレクトリを (再帰的に) 圧縮するには lrztar が必要です。最初にディレクトリが tar でまとめられてから圧縮されます。tar で gzip や xz を使って圧縮するのと同じです (tar zcf ...
または tar Jcz ...
)。なお、rzip と同様に、事前の圧縮処理の後に圧縮アルゴリズムが適用され、例えば一般的な LZMA 圧縮アーカイブとは異なります。
foo
という名前のディレクトリから LZMA で圧縮されたアーカイブ foo.tar.lrz
を作成するには:
$ lrztar foo
bar
という名前のディレクトリから LZMA 圧縮アーカイブ bar.lrz
を作成するには:
$ lrzip bar
圧縮率を高めたい場合、-z
スイッチを追加することで ZPAQ が有効になりますが LZMA よりも長い時間がかかります:
$ lrztar -z foo
圧縮・展開の時間を高速にしたい場合、-l
スイッチで LZO を使うことができます:
$ lrzip -l bar
展開
圧縮されたディレクトリを展開するには:
$ lrzuntar foo.tar.lrz
bar.lrz
を bar
に展開するには:
$ lrunzip bar.lrz
詳細
Lrzip uses an extended version of rzip, which does a first pass long distance redundancy reduction. The lrzip modifications make it scale according to memory size. The data is then either:
- Compressed by LZMA (default), which gives excellent compression at approximately twice the speed of bzip2 compression
- Compressed by a number of other compressors chosen for different reasons, in order of likelihood of usefulness:
- ZPAQ: Extreme compression up to 20% smaller than LZMA, but ultra slow at compression AND decompression.
- LZO: Extremely fast compression and decompression, which on most machines compresses faster than disk writing making it as fast (or even faster) than simply copying a large file.
- GZIP: Almost as fast as LZO, but with better compression.
- BZIP2: A defacto linux standard of sorts, but is the middle ground between LZMA and gzip and neither here nor there.
- Leaving it uncompressed and rzip prepared. This form improves substantially any compression performed on the resulting file in both size and speed (due to the nature of rzip preparation merging similar compressible blocks of data and creating a smaller file). By "improving" it will either speed up the very slow compressors with minor detriment to compression, or greatly increase the compression of simple compression algorithms.
The major disadvantages are:
- The main lrzip application only works on single files, so it requires the lrztar wrapper to fake a complete archiver.
- It requires a lot of memory to get the best performance out of (as much memory as the size of the data to compress; but see the sliding mmap below), and is not really usable (for compression) with less than 256MB. Decompression requires less ram and works on smaller ram machines. Sometimes swap may need to be enabled on these lower ram machines for the operating system to be happy.
- STDIN/STDOUT works fine on both compression and decompression, but larger files compressed in this manner will end up being less efficiently compressed.
The unique feature of lrzip is that it tries to make the most of the available ram in your system at all times for maximum benefit. It does this by default, choosing the largest sized window possible without running out of memory. It also has a unique "sliding mmap" feature which makes it possible to even use a compression window larger than your ramsize, if the file is that large. It does this (with the -U
option) by implementing one large mmap buffer as per normal, and a smaller moving buffer to track which part of the file is currently being examined, emulating a much larger single mmapped buffer. Unfortunately, this mode can be many times slower.