public Bcj2DecoderStream(Stream[] streams, byte[] info, long limit) { if (info != null && info.Length > 0) { throw new NotSupportedException(); } if (streams.Length != 4) { throw new NotSupportedException(); } mLimit = limit; mMainStream = streams[0]; mCallStream = streams[1]; mJumpStream = streams[2]; mRangeDecoder = new RangeDecoder(streams[3]); mStatusDecoder = new StatusDecoder[256 + 2]; for (int i = 0; i < mStatusDecoder.Length; i++) { mStatusDecoder[i] = new StatusDecoder(); } mIter = Run().GetEnumerator(); }
private int Read(byte[] buffer, int offset, int count) { if (mStatusDecoder == null) { mStatusDecoder = new StatusDecoder[256 + 2]; for (int i = 0; i < mStatusDecoder.Length; i++) { mStatusDecoder[i] = new StatusDecoder(); } mIter = Run().GetEnumerator(); } var result = DecodeInto(buffer, offset, count); mPosition += result; return(result); }
public Bcj2DecoderStream(Stream[] streams, byte[] info, long limit) { if (info != null && info.Length > 0) throw new NotSupportedException(); if (streams.Length != 4) throw new NotSupportedException(); mMainStream = streams[0]; mCallStream = streams[1]; mJumpStream = streams[2]; mRangeDecoder = new RangeDecoder(streams[3]); mStatusDecoder = new StatusDecoder[256 + 2]; for (int i = 0; i < mStatusDecoder.Length; i++) mStatusDecoder[i] = new StatusDecoder(); mIter = Run().GetEnumerator(); }
private int Read(byte[] buffer, int offset, int count) { if (mStatusDecoder == null) { mStatusDecoder = new StatusDecoder[256 + 2]; for (int i = 0; i < mStatusDecoder.Length; i++) mStatusDecoder[i] = new StatusDecoder(); mIter = Run().GetEnumerator(); } var result = DecodeInto(buffer, offset, count); mPosition += result; return result; }