mruby へ LZMA/XZ 圧縮ライブラリの機能を提供します。
src = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
dest = LZMA.encode(src)
# dest は xz ユーティリティプログラムで伸長可能な string オブジェクトです
src = ... # LZMA.encode か xz ユーティリティプログラムで圧縮したデータ
dest = LZMA.decode(src)
# dest は伸長した string オブジェクト
src = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
preset_level = 9
check_method = :sha256 # OR :none, :crc32, :crc64, nil (crc64)
dest = LZMA.encode(src, preset: preset_level, check: check_method)
src = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
striping = 4 # for 4 bytes striping (e.g. 16bits-2ch audio, or RGBA32 pixel image
filter1 = LZMA.delta(striping)
preset_level = 9
filter2 = LZMA.lzma2(preset_level)
check_method = :sha256 # OR :none, :crc32, :crc64, nil (crc64)
dest = LZMA.encode(src, filter1, filter2, check: check_method)
- Product name: mruby-lzma
- Version: 0.3.2
- Product quality: PROTOTYPE
- Author: dearblue
- Report issue to: https://github.com/dearblue/mruby-lzma/issues
- Licensing: 2 clause BSD License
- Dependency external mrbgems:
- Dependency C libraries:
- liblzma in XZ Utils under Public Domain by Lasse Collin