Lines Matching +full:com +full:- +full:offset
1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 1996-2012 Markus F.X.J. Oberhumer <markus@oberhumer.com>
8 * http://www.oberhumer.com/opensource/lzo/
11 * Nitin Gupta <nitingupta910@gmail.com>
12 * Richard Purdie <rpurdie@openedhand.com>
23 #define HAVE_IP(x) ((size_t)(ip_end - ip) >= (size_t)(x))
24 #define HAVE_OP(x) ((size_t)(op_end - op) >= (size_t)(x))
37 #define MAX_255_COUNT ((((size_t)~0) / 255) - 2)
66 t = *ip++ - 17; in lzo1x_decompress_safe()
79 size_t offset; in lzo1x_decompress_safe() local
86 offset = ip - ip_last; in lzo1x_decompress_safe()
87 if (unlikely(offset > MAX_255_COUNT)) in lzo1x_decompress_safe()
90 offset = (offset << 8) - offset; in lzo1x_decompress_safe()
91 t += offset + 15 + *ip++; in lzo1x_decompress_safe()
116 } while (--t > 0); in lzo1x_decompress_safe()
122 m_pos = op - 1; in lzo1x_decompress_safe()
123 m_pos -= t >> 2; in lzo1x_decompress_safe()
124 m_pos -= *ip++ << 2; in lzo1x_decompress_safe()
133 m_pos = op - (1 + M2_MAX_OFFSET); in lzo1x_decompress_safe()
134 m_pos -= t >> 2; in lzo1x_decompress_safe()
135 m_pos -= *ip++ << 2; in lzo1x_decompress_safe()
140 m_pos = op - 1; in lzo1x_decompress_safe()
141 m_pos -= (t >> 2) & 7; in lzo1x_decompress_safe()
142 m_pos -= *ip++ << 3; in lzo1x_decompress_safe()
143 t = (t >> 5) - 1 + (3 - 1); in lzo1x_decompress_safe()
145 t = (t & 31) + (3 - 1); in lzo1x_decompress_safe()
147 size_t offset; in lzo1x_decompress_safe() local
154 offset = ip - ip_last; in lzo1x_decompress_safe()
155 if (unlikely(offset > MAX_255_COUNT)) in lzo1x_decompress_safe()
158 offset = (offset << 8) - offset; in lzo1x_decompress_safe()
159 t += offset + 31 + *ip++; in lzo1x_decompress_safe()
162 m_pos = op - 1; in lzo1x_decompress_safe()
165 m_pos -= next >> 2; in lzo1x_decompress_safe()
185 m_pos -= (t & 8) << 11; in lzo1x_decompress_safe()
186 t = (t & 7) + (3 - 1); in lzo1x_decompress_safe()
188 size_t offset; in lzo1x_decompress_safe() local
195 offset = ip - ip_last; in lzo1x_decompress_safe()
196 if (unlikely(offset > MAX_255_COUNT)) in lzo1x_decompress_safe()
199 offset = (offset << 8) - offset; in lzo1x_decompress_safe()
200 t += offset + 7 + *ip++; in lzo1x_decompress_safe()
205 m_pos -= next >> 2; in lzo1x_decompress_safe()
209 m_pos -= 0x4000; in lzo1x_decompress_safe()
214 if (op - m_pos >= 8) { in lzo1x_decompress_safe()
267 t--; in lzo1x_decompress_safe()
273 *out_len = op - out; in lzo1x_decompress_safe()
279 *out_len = op - out; in lzo1x_decompress_safe()
283 *out_len = op - out; in lzo1x_decompress_safe()
287 *out_len = op - out; in lzo1x_decompress_safe()