/// <summary> /// Construct a decoder with the given settings. The amount of memory required depends on the settings. /// </summary> /// <param name="settings">The settings for the decoder must match the settings used when the data was encoded.</param> public Decoder(DecoderSettings settings) { mSettings = settings; mDecoder = new Master.LZMA.CLzmaDec(); mDecoder.LzmaDec_Construct(); if (mDecoder.LzmaDec_Allocate(settings.ToArray(), Master.LZMA.LZMA_PROPS_SIZE, Master.LZMA.ISzAlloc.SmallAlloc) != Master.LZMA.SZ_OK) throw new InvalidOperationException(); mDecoder.LzmaDec_Init(); }
public AsyncDecoder(DecoderSettings settings) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } mSyncObject = new object(); mDecodeAction = new Action(Decode); mDecoder = new Decoder(settings); }
/// <summary> /// Construct a decoder with the given settings. The amount of memory required depends on the settings. /// </summary> /// <param name="settings">The settings for the decoder must match the settings used when the data was encoded.</param> public Decoder(DecoderSettings settings) { mSettings = settings; mDecoder = new Master.LZMA.CLzmaDec(); mDecoder.LzmaDec_Construct(); if (mDecoder.LzmaDec_Allocate(settings.ToArray(), Master.LZMA.LZMA_PROPS_SIZE, Master.LZMA.ISzAlloc.SmallAlloc) != Master.LZMA.SZ_OK) { throw new InvalidOperationException(); } mDecoder.LzmaDec_Init(); }
public AsyncDecoder(DecoderSettings settings) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } mSyncObject = new object(); mDecodeAction = new Action(Decode); mDecoder = new Decoder(settings); mInputQueue = new Queue <InputFrame>(); mOutputQueue = new Queue <OutputFrame>(); }
public AsyncDecoder(DecoderSettings settings) { if (settings == null) throw new ArgumentNullException(nameof(settings)); mSyncObject = new object(); mDecodeAction = new Action(Decode); mDecoder = new Decoder(settings); }