ICSharpCode.SharpZipLib.Zip.Compression.PendingBuffer.AlignToByte C# (CSharp) Method

AlignToByte() public method

Align internal buffer on a byte boundary
public AlignToByte ( ) : void
return void
        public void AlignToByte()
        {
            #if DebugDeflation
            if (DeflaterConstants.DEBUGGING && (start != 0) )
            {
                throw new SharpZipBaseException("Debug check: start != 0");
            }
            #endif
            if (bitCount > 0) {
                buffer_[end++] = unchecked((byte)bits);
                if (bitCount > 8) {
                    buffer_[end++] = unchecked((byte)(bits >> 8));
                }
            }
            bits = 0;
            bitCount = 0;
        }