BitMiracle.LibJpeg.BitStream.seekSet C# (CSharp) Method

seekSet() private method

private seekSet ( int pos ) : void
pos int
return void
        private void seekSet(int pos)
        {
            if (pos < 0)
                throw new ArgumentOutOfRangeException("pos");

            int byteDisplacement = pos / bitsInByte;
            m_stream.Seek(byteDisplacement, SeekOrigin.Begin);

            int shiftInByte = pos - byteDisplacement * bitsInByte;
            m_positionInByte = shiftInByte;
        }