Lines Matching defs:pos
81 unsigned reference_pos, match_length, delta, pos = 0;
96 if (pos + num_literals < HISTORY_SIZE) {
97 bytestream2_get_buffer(gb, history + pos, num_literals);
98 pos += num_literals;
101 history[pos++] = bytestream2_get_byte(gb);
102 if (pos == HISTORY_SIZE) {
104 pos = 0;
124 reference_pos = (pos >= delta) ? (pos - delta) : (HISTORY_SIZE + pos - delta);
125 if (pos + match_length < HISTORY_SIZE && reference_pos + match_length < HISTORY_SIZE) {
126 if (pos >= reference_pos + match_length || reference_pos >= pos + match_length) {
127 memcpy(history + pos, history + reference_pos, match_length);
128 pos += match_length;
131 history[pos++] = history[reference_pos++];
135 history[pos++] = history[reference_pos++];
136 if (pos == HISTORY_SIZE) {
138 pos = 0;
145 bytestream2_put_buffer(pb, history, pos);