iTextSharp.text.pdf.codec.LZWStringTable.ClearTable C# (CSharp) 메소드

ClearTable() 공개 메소드

public ClearTable ( int codesize ) : void
codesize int
리턴 void
        public void ClearTable(int codesize)
        {
            numStrings_ = 0;

            for (int q = 0; q < HASHSIZE; q++)
                strHsh_[q] = HASH_FREE;

            int w = (1 << codesize) + RES_CODES;
            for (int q = 0; q < w; q++)
                AddCharString(-1, (byte)q);	// init with no prefix
        }

Usage Example

예제 #1
0
        /**
         * @param outp destination for compressed data
         * @param codeSize the initial code size for the LZW compressor
         * @param TIFF flag indicating that TIFF lzw fudge needs to be applied
         * @exception IOException if underlying output stream error
         **/
        public LZWCompressor(Stream outp, int codeSize, bool TIFF)
        {
            bf_        = new BitFile(outp, !TIFF); // set flag for GIF as NOT tiff
            codeSize_  = codeSize;
            tiffFudge_ = TIFF;
            clearCode_ = 1 << codeSize_;
            endOfInfo_ = clearCode_ + 1;
            numBits_   = codeSize_ + 1;

            limit_ = (1 << numBits_) - 1;
            if (tiffFudge_)
            {
                --limit_;
            }

            prefix_ = -1;
            lzss_   = new LZWStringTable();
            lzss_.ClearTable(codeSize_);
            bf_.WriteBits(clearCode_, numBits_);
        }
All Usage Examples Of iTextSharp.text.pdf.codec.LZWStringTable::ClearTable