Lines Matching defs:length

705  *                   content (of length ctx->dictSize), which is available
709 * else in memory, starting at ctx->dictionary with length
1115 * - token and *token : position to write 4-bits for match length; higher 4-bits for literal length supposed already written
1229 lowLimit = dictionary; /* required for match length counter */
1233 lowLimit = (const BYTE*)source; /* required for match length counter */
1239 lowLimit = dictionary; /* required for match length counter */
1242 lowLimit = (const BYTE*)source; /* required for match length counter */
1275 lastRun -= (lastRun + 256 - RUN_MASK) / 256; /*additional length tokens*/
1559 * advance by a whole window length so we can provide the guarantee that
1781 DEBUGLOG(6, "read_long_length_no_check: +length=%zu using %zu input bytes", l, l/255 + 1)
1820 /* long literal length */
1841 /* long literal length */
1894 /* Read the variable-length literal or match length.
1897 * @ilimit : position after which if length is not decoded, the input is necessarily corrupted.
1907 Rvl_t s, length = 0;
1917 length += s;
1922 if ((sizeof(length)<8) && unlikely(length > ((Rvl_t)(-1)/2)) ) {
1927 return length;
1971 size_t length;
2001 length = token >> ML_BITS; /* literal length */
2003 /* decode literal length */
2004 if (length == RUN_MASK) {
2007 length += addl;
2008 if (unlikely((uptrval)(op)+length<(uptrval)(op))) { goto _output_error; } /* overflow detection */
2009 if (unlikely((uptrval)(ip)+length<(uptrval)(ip))) { goto _output_error; } /* overflow detection */
2012 cpy = op+length;
2014 if ((cpy>oend-32) || (ip+length>iend-32)) { goto safe_literal_copy; }
2016 ip += length; op = cpy;
2018 cpy = op+length;
2019 DEBUGLOG(7, "copy %u bytes in a 16-bytes stripe", (unsigned)length);
2024 ip += length; op = cpy;
2033 length = token & ML_MASK;
2035 if (length == ML_MASK) {
2038 length += addl;
2039 length += MINMATCH;
2040 if (unlikely((uptrval)(op)+length<(uptrval)op)) { goto _output_error; } /* overflow detection */
2042 if (op + length >= oend - FASTLOOP_SAFE_DISTANCE) {
2046 length += MINMATCH;
2047 if (op + length >= oend - FASTLOOP_SAFE_DISTANCE) {
2061 op += length;
2069 if (unlikely(op+length > oend-LASTLITERALS)) {
2072 length = MIN(length, (size_t)(oend-op));
2077 if (length <= (size_t)(lowPrefix-match)) {
2079 LZ4_memmove(op, dictEnd - (lowPrefix-match), length);
2080 op += length;
2084 size_t const restSize = length - copySize;
2099 cpy = op + length;
2117 length = token >> ML_BITS; /* literal length */
2120 * 1) If the literal length is 0..14, and there is enough space,
2123 * 2) Further if the match length is 4..18, copy 18 bytes in a similar
2128 if ( (length != RUN_MASK)
2133 op += length; ip += length;
2137 length = token & ML_MASK; /* match length */
2143 if ( (length != ML_MASK)
2150 op += length + MINMATCH;
2160 /* decode literal length */
2161 if (length == RUN_MASK) {
2164 length += addl;
2165 if (unlikely((uptrval)(op)+length<(uptrval)(op))) { goto _output_error; } /* overflow detection */
2166 if (unlikely((uptrval)(ip)+length<(uptrval)(ip))) { goto _output_error; } /* overflow detection */
2170 cpy = op+length;
2175 if ((cpy>oend-MFLIMIT) || (ip+length>iend-(2+1+LASTLITERALS))) {
2186 DEBUGLOG(7, "partialDecoding: literal length = %u", (unsigned)length);
2192 if (ip+length > iend) {
2193 length = (size_t)(iend-ip);
2194 cpy = op + length;
2202 length = (size_t)(oend-op);
2208 if ((ip+length != iend) || (cpy > oend)) {
2210 DEBUGLOG(6, "ip(%p) + length(%i) = %p != iend (%p)", ip, (int)length, ip+length, iend);
2215 LZ4_memmove(op, ip, length); /* supports overlapping memory regions, for in-place decompression scenarios */
2216 ip += length;
2217 op += length;
2228 ip += length; op = cpy;
2236 length = token & ML_MASK;
2239 if (length == ML_MASK) {
2242 length += addl;
2243 if (unlikely((uptrval)(op)+length<(uptrval)op)) goto _output_error; /* overflow detection */
2245 length += MINMATCH;
2254 if (unlikely(op+length > oend-LASTLITERALS)) {
2255 if (partialDecoding) length = MIN(length, (size_t)(oend-op));
2259 if (length <= (size_t)(lowPrefix-match)) {
2261 LZ4_memmove(op, dictEnd - (lowPrefix-match), length);
2262 op += length;
2266 size_t const restSize = length - copySize;
2282 cpy = op + length;
2287 size_t const mlen = MIN(length, (size_t)(oend-op));
2326 if (length > 16) { LZ4_wildCopy8(op+8, match+8, cpy); }