Lines Matching refs:lc
160 outputBits (int nBits, Int64 bits, Int64 &c, int &lc, char *&out)
163 lc += nBits;
167 while (lc >= 8)
168 *out++ = (c >> (lc -= 8));
173 getBits (int nBits, Int64 &c, int &lc, const char *&in)
175 while (lc < nBits)
178 lc += 8;
181 lc -= nBits;
182 return (c >> lc) & ((1 << nBits) - 1);
474 int lc = 0;
496 outputBits (6, LONG_ZEROCODE_RUN, c, lc, p);
497 outputBits (8, zerun - SHORTEST_LONG_RUN, c, lc, p);
501 outputBits (6, SHORT_ZEROCODE_RUN + zerun - 2, c, lc, p);
507 outputBits (6, l, c, lc, p);
510 if (lc > 0)
511 *p++ = (unsigned char) (c << (8 - lc));
533 int lc = 0;
540 Int64 l = hcode[im] = getBits (6, c, lc, p); // code length
547 int zerun = getBits (8, c, lc, p) + SHORTEST_LONG_RUN;
719 outputCode (Int64 code, Int64 &c, int &lc, char *&out)
721 outputBits (hufLength (code), hufCode (code), c, lc, out);
727 Int64 &c, int &lc, char *&out)
733 outputCode (sCode, c, lc, out);
734 outputCode (runCode, c, lc, out);
735 outputBits (8, runCount, c, lc, out);
740 outputCode (sCode, c, lc, out);
759 int lc = 0; // number of valid bits in c (LSB)
779 sendCode (hcode[s], cs, hcode[rlc], c, lc, out);
790 sendCode (hcode[s], cs, hcode[rlc], c, lc, out);
792 if (lc)
793 *out = (c << (8 - lc)) & 0xff;
795 return (out - outStart) * 8 + lc;
809 #define getChar(c, lc, in) \
812 lc += 8; \
816 #define getCode(po, rlc, c, lc, in, out, oe) \
820 if (lc < 8) \
821 getChar(c, lc, in); \
823 lc -= 8; \
825 unsigned char cs = (c >> lc); \
861 int lc = 0;
872 getChar (c, lc, in);
878 while (lc >= HUF_DECBITS)
880 const HufDec pl = hdecod[(c >> (lc-HUF_DECBITS)) & HUF_DECMASK];
888 lc -= pl.len;
889 getCode (pl.lit, rlc, c, lc, in, out, oe);
906 while (lc < l && in < ie) // get more bits
907 getChar (c, lc, in);
909 if (lc >= l)
912 ((c >> (lc - l)) & ((Int64(1) << l) - 1)))
918 lc -= l;
919 getCode (pl.p[j], rlc, c, lc, in, out, oe);
937 lc -= i;
939 while (lc > 0)
941 const HufDec pl = hdecod[(c << (HUF_DECBITS - lc)) & HUF_DECMASK];
945 lc -= pl.len;
946 getCode (pl.lit, rlc, c, lc, in, out, oe);