equal
deleted
inserted
replaced
145 #define COPY8(d,s) { ZSTD_copy8(d,s); d+=8; s+=8; } |
145 #define COPY8(d,s) { ZSTD_copy8(d,s); d+=8; s+=8; } |
146 |
146 |
147 /*! ZSTD_wildcopy() : |
147 /*! ZSTD_wildcopy() : |
148 * custom version of memcpy(), can copy up to 7 bytes too many (8 bytes if length==0) */ |
148 * custom version of memcpy(), can copy up to 7 bytes too many (8 bytes if length==0) */ |
149 #define WILDCOPY_OVERLENGTH 8 |
149 #define WILDCOPY_OVERLENGTH 8 |
150 MEM_STATIC void ZSTD_wildcopy(void* dst, const void* src, size_t length) |
150 MEM_STATIC void ZSTD_wildcopy(void* dst, const void* src, ptrdiff_t length) |
151 { |
151 { |
152 const BYTE* ip = (const BYTE*)src; |
152 const BYTE* ip = (const BYTE*)src; |
153 BYTE* op = (BYTE*)dst; |
153 BYTE* op = (BYTE*)dst; |
154 BYTE* const oend = op + length; |
154 BYTE* const oend = op + length; |
155 do |
155 do |
220 U32 log2matchSum; |
220 U32 log2matchSum; |
221 U32 log2litLengthSum; |
221 U32 log2litLengthSum; |
222 U32 log2litSum; |
222 U32 log2litSum; |
223 U32 log2offCodeSum; |
223 U32 log2offCodeSum; |
224 U32 factor; |
224 U32 factor; |
|
225 U32 staticPrices; |
225 U32 cachedPrice; |
226 U32 cachedPrice; |
226 U32 cachedLitLength; |
227 U32 cachedLitLength; |
227 const BYTE* cachedLiterals; |
228 const BYTE* cachedLiterals; |
228 } seqStore_t; |
229 } seqStore_t; |
229 |
230 |
232 int ZSTD_isSkipFrame(ZSTD_DCtx* dctx); |
233 int ZSTD_isSkipFrame(ZSTD_DCtx* dctx); |
233 |
234 |
234 /* custom memory allocation functions */ |
235 /* custom memory allocation functions */ |
235 void* ZSTD_defaultAllocFunction(void* opaque, size_t size); |
236 void* ZSTD_defaultAllocFunction(void* opaque, size_t size); |
236 void ZSTD_defaultFreeFunction(void* opaque, void* address); |
237 void ZSTD_defaultFreeFunction(void* opaque, void* address); |
|
238 #ifndef ZSTD_DLL_IMPORT |
237 static const ZSTD_customMem defaultCustomMem = { ZSTD_defaultAllocFunction, ZSTD_defaultFreeFunction, NULL }; |
239 static const ZSTD_customMem defaultCustomMem = { ZSTD_defaultAllocFunction, ZSTD_defaultFreeFunction, NULL }; |
|
240 #endif |
238 void* ZSTD_malloc(size_t size, ZSTD_customMem customMem); |
241 void* ZSTD_malloc(size_t size, ZSTD_customMem customMem); |
239 void ZSTD_free(void* ptr, ZSTD_customMem customMem); |
242 void ZSTD_free(void* ptr, ZSTD_customMem customMem); |
240 |
243 |
241 |
244 |
242 /*====== common function ======*/ |
245 /*====== common function ======*/ |