Class: LibLZMA::Stream::AutoDecoder
- Inherits:
-
LibLZMA::Stream
- Object
- LibLZMA::Stream
- LibLZMA::Stream::AutoDecoder
- Defined in:
- ext/liblzma.c
Instance Method Summary collapse
Methods inherited from LibLZMA::Stream
auto_decoder, decoder, encoder, #finish, #flush, raw_decoder, raw_encoder, #update
Constructor Details
#LZMA::Stream::AutoDecoder.new(memlimit = nil, flags = nil) ⇒ Object
962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 |
# File 'ext/liblzma.c', line 962
static VALUE
autodecoder_init(int argc, VALUE argv[], VALUE self)
{
VALUE memlimit0 = Qnil;
VALUE flags0 = Qnil;
uint64_t memlimit = UINT64_MAX;
uint32_t flags = 0;
rb_scan_args(argc, argv, "02", &memlimit0, &flags0);
if (!NIL_P(flags0)) { flags = NUM2SIZET(flags0); }
if (!NIL_P(memlimit0)) { memlimit = NUM2SIZET(memlimit0); }
lzma_stream *stream = getstream(self);
LZMA_TEST(lzma_auto_decoder(stream, memlimit, flags));
return self;
}
|