private void _fillWindow() { do { int num = window_size - lookahead - strstart; int num2; if (num == 0 && strstart == 0 && lookahead == 0) { num = w_size; } else if (num == -1) { num--; } else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) { Array.Copy(window, w_size, window, 0, w_size); match_start -= w_size; strstart -= w_size; block_start -= w_size; num2 = hash_size; int num3 = num2; do { int num4 = head[--num3] & 0xFFFF; head[num3] = (short)((num4 >= w_size) ? (num4 - w_size) : 0); }while (--num2 != 0); num2 = w_size; num3 = num2; do { int num4 = prev[--num3] & 0xFFFF; prev[num3] = (short)((num4 >= w_size) ? (num4 - w_size) : 0); }while (--num2 != 0); num += w_size; } if (_codec.AvailableBytesIn == 0) { break; } num2 = _codec.read_buf(window, strstart + lookahead, num); lookahead += num2; if (lookahead >= MIN_MATCH) { ins_h = (window[strstart] & 0xFF); ins_h = (((ins_h << hash_shift) ^ (window[strstart + 1] & 0xFF)) & hash_mask); } }while (lookahead < MIN_LOOKAHEAD && _codec.AvailableBytesIn != 0); }
private void _fillWindow() { do { int more = window_size - lookahead - strstart; int m; if (more == 0 && strstart == 0 && lookahead == 0) { more = w_size; } else if (more == -1) { more--; } else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) { Array.Copy(window, w_size, window, 0, w_size); match_start -= w_size; strstart -= w_size; block_start -= w_size; m = hash_size; int p2 = m; do { int l = head[--p2] & 0xFFFF; head[p2] = (short)((l >= w_size) ? (l - w_size) : 0); }while (--m != 0); m = w_size; p2 = m; do { int l = prev[--p2] & 0xFFFF; prev[p2] = (short)((l >= w_size) ? (l - w_size) : 0); }while (--m != 0); more += w_size; } if (_codec.AvailableBytesIn == 0) { break; } m = _codec.read_buf(window, strstart + lookahead, more); lookahead += m; if (lookahead >= MIN_MATCH) { ins_h = (window[strstart] & 0xFF); ins_h = (((ins_h << hash_shift) ^ (window[strstart + 1] & 0xFF)) & hash_mask); } }while (lookahead < MIN_LOOKAHEAD && _codec.AvailableBytesIn != 0); }