るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.067秒)
トップページ > 種類:インスタンスメソッド[x] > クエリ:j[x] > クラス:Zlib::Deflate[x]

別のキーワード

  1. encoding windows_31j
  2. encoding cswindows31j
  3. _builtin windows_31j
  4. _builtin cswindows31j
  5. json j

ライブラリ

検索結果

Zlib::Deflate#params(level, strategy) -> nil (8.0)

圧縮ストリームの設定を変更します。詳しくは zlib.h を 参照して下さい。設定の変更に伴うストリームからの出力は 出力バッファに保存されます。

...require 'zlib'

def case1
dez = Zlib::Deflate.new
comp_str = dez.deflate('hoge'*5);
comp_str << dez.deflate('0'*80)
comp_str << dez.finish
p comp_str
p Zlib::Inflate.inflate(comp_str)
end

def case2
dez = Zlib::Deflate.new
comp_str = dez.deflate('hoge'*5);...
...#=> "hogehogehogehogehoge00000000000000000000000000000000000000000000000000000000000000000000000000000000"
#=> "x\234\005\3011\r\000\000\f\003 K\230j\326\257\376\277Aw\351.\335\245\273t\027\000\000\000\000\000\000\000\000\000\200\aD\367\0270"
#=> "hogehogehogehogehoge0000000000000000000000000000...