/// <summary>
        /// Get the offset when compress mode is 8k
        /// </summary>
        /// <param name="offsetBitCount">the bits count offset used</param>
        /// <param name="actualOffsetBitCount">the bits count offset used without flag</param>
        private void GetOffsetFromRemain8K(
            OffsetBitSize8k offsetBitCount,
            OffsetBitSizeWithoutSymbol8k actualOffsetBitCount)
        {
            uint adding = 0;

            // determin the adding value according to offset flag
            if (actualOffsetBitCount == OffsetBitSizeWithoutSymbol8k.Between64And320)
            {
                adding = (uint)OffsetAdding8k.Between64And320;
            }
            else if (actualOffsetBitCount == OffsetBitSizeWithoutSymbol8k.Between320And8191)
            {
                adding = (uint)OffsetAdding8k.Between320And8191;
            }
            else
            {
                //adding = 0;
            }

            //get offset from high bits part of remain.
            //this bits are pushed to remain earlier than others
            offset           = ((remain >> (remainBitsCount - (int)offsetBitCount)) & (uint)((1 << (int)actualOffsetBitCount) - 1)) + adding;
            remainBitsCount -= (int)offsetBitCount;
            // elimate the decoded bits
            remain = remain & (uint)((1 << remainBitsCount) - 1);
        }
        /// <summary>
        /// Get the offset when compress mode is 8k
        /// </summary>
        /// <param name="offsetBitCount">the bits count offset used</param>
        /// <param name="actualOffsetBitCount">the bits count offset used without flag</param>
        private void GetOffsetFromRemain8K(
            OffsetBitSize8k offsetBitCount,
            OffsetBitSizeWithoutSymbol8k actualOffsetBitCount)
        {
            uint adding = 0;
            // determin the adding value according to offset flag
            if (actualOffsetBitCount == OffsetBitSizeWithoutSymbol8k.Between64And320)
            {
                adding = (uint)OffsetAdding8k.Between64And320;
            }
            else if (actualOffsetBitCount == OffsetBitSizeWithoutSymbol8k.Between320And8191)
            {
                adding = (uint)OffsetAdding8k.Between320And8191;
            }
            else
            {
                //adding = 0;
            }

            //get offset from high bits part of remain.
            //this bits are pushed to remain earlier than others
            offset = ((remain >> (remainBitsCount - (int)offsetBitCount)) & (uint)((1 << (int)actualOffsetBitCount) - 1)) + adding;
            remainBitsCount -= (int)offsetBitCount;
            // elimate the decoded bits
            remain = remain & (uint)((1 << remainBitsCount) - 1);
        }