- /* Validate the match, then copy it to the current position. */
-
- if (unlikely(length > block_end - out_next))
- return -1;
-
- if (unlikely(offset > out_next - out_begin))
+ /* Validate the match and copy it to the current position. */
+ if (unlikely(lz_copy(length, offset, out_begin,
+ out_next, block_end, LZX_MIN_MATCH_LEN)))