Home | History | Annotate | Download | only in third_party

Lines Matching defs:newbuf

154 matchlen(const unsigned char *old,int oldsize,const unsigned char *newbuf,int newsize)
159 if(old[i]!=newbuf[i]) break;
166 const unsigned char *newbuf,int newsize,int st,int en,int *pos)
171 x=matchlen(old+I[st],oldsize-I[st],newbuf,newsize);
172 y=matchlen(old+I[en],oldsize-I[en],newbuf,newsize);
184 if(memcmp(old+I[x],newbuf,std::min(oldsize-I[x],newsize))<0) {
185 return search(I,old,oldsize,newbuf,newsize,x,en,pos);
187 return search(I,old,oldsize,newbuf,newsize,st,x,pos);
244 const uint8* newbuf = new_stream->Buffer();
258 // a triple for the part of |newbuf| surrounding a 'seed' match near
260 // the next triple. As we scan through |newbuf|, one of four things can
275 // 4. There is no match because we reached the end of the input, |newbuf|.
277 // This is how the loop advances through the bytes of |newbuf|:
304 newbuf + scan, newsize - scan,
309 (old[scsc + lastoffset] == newbuf[scsc]))
318 (old[scan + lastoffset] == newbuf[scan]))
337 if (old[pos - i] == newbuf[scan - i]) score++;
352 if (old[lastpos + i] == newbuf[lastscan + i]) score++;
365 if (newbuf[lastscan + lenf - overlap + i] ==
367 if (newbuf[scan - lenb + i] == old[pos - lenb + i]) score--;
376 uint8 diff_byte = newbuf[lastscan + i] - old[lastpos + i];
390 if (!extra_bytes->Write(&newbuf[lastscan + lenf + i], 1))