Skip to content
mruby bindings for lzma (xz)
C Ruby
Branch: wip
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
mrblib
src
test
.travis.yml
.travis_config.rb
LICENSE
README.md
Rakefile
mrbgem.rake
test_config.rb

README.md

mruby-lzma : mruby bindings for lzma (xz) the compression library (unofficial)

mruby へ LZMA/XZ 圧縮ライブラリの機能を提供します。

HOW TO USAGE

圧縮

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)

Specification

You can’t perform that action at this time.