countMatchWithDict
private fn
size_t countMatchWithDict(
const(ubyte)[] dict,
const(ubyte)[] src,
size_t matchPos,
size_t srcPos,
size_t maxLen
)Count matching bytes when the match candidate may be in the dictionary.
This function handles the case where the match position (matchPos) may reference the dictionary (positions 0..dictLen-1) or the source data (positions dictLen..dictLen+srcLen-1). The current position (srcPos) is always in the source data.
Parameters
dict | Dictionary data (may be empty). |
src | Source data being compressed. |
matchPos | Position of the match candidate in the combined dict+src space. |
srcPos | Current position in src (0-based within src, not combined). |
maxLen | Maximum number of bytes to compare. |
Returns
The number of consecutive matching bytes (0 to maxLen).