Class: LZMA::Stream::Decoder

Inherits:
LZMA::Stream show all
Defined in:
ext/extlzma2/stream.c

Instance Method Summary collapse

Methods inherited from LZMA::Stream

auto_decoder, #code, decoder, encoder, raw_decoder, raw_encoder

Constructor Details

#initialize(memlimit = nil, flags = 0) ⇒ Object

xz ストリームの伸張器を返します。

引数については AutoDecoder#initialize と同じです。



341
342
343
344
345
346
347
348
349
350
351
352
# File 'ext/extlzma2/stream.c', line 341

static VALUE decoder_init(int argc, VALUE argv[], VALUE stream)
{
    lzma_stream *p = getstream(stream);

    uint64_t memlimit;
    uint32_t flags;
    ext_decoder_init_scanargs(argc, argv, &memlimit, &flags);

    AUX_LZMA_TEST(RETRY_NOMEM(2, lzma_stream_decoder(p, memlimit, flags)));

    return stream;
}