るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.058秒)
トップページ > クエリ:-[x] > クエリ:Set[x] > クラス:Zlib::Inflate[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

キーワード

検索結果

Zlib::Inflate#set_dictionary(string) -> String (6214.0)

展開に用いる辞書を指定します。string を返します。 このメソッドは Zlib::NeedDict 例外が発生した直後のみ 有効です。詳細は zlib.h を参照して下さい。

...:Deflate.new
dez.set_dictionary(dict)
comp_str = dez.deflate(str)
comp_str << dez.finish
comp_str.size
inz = Zlib::Inflate.new
begin
inz.inflate(comp_str)
rescue Zlib::NeedDict
end
# 展開に用いる辞書が必要です。
inz.set_dictionary(dict)...
....inflate(comp_str)
end
dict = 'hoge_fuga_ugougo'
sset = [ dict, 'taeagbamike', 'ugotagma', 'fugebogya' ]
g = [ 0, 0, 0, 1, 1, 1, 0, 0, 0, 3, 3, 3, 0, 0, 1, 1,
0, 0, 0, 1, 2, 2, 0, 0, 0, 2, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0]
str = g.collect{|m| sset.at(m)}.join("")

case2(str, dict)...

Zlib::Inflate#inflate(string) -> String (107.0)

string を展開ストリームに入力します。

...
Zlib::Inflate
#set_dictionary メソッドで辞書をセットした
後で、空文字列と共にこのメソッドを再度呼び出して下さい。

require 'zlib'

cstr = "x\234\313\310OOUH+MOTH\315K\001\000!\251\004\276"
inz = Zlib::Inflate....