Project Alice
Loading...
Searching...
No Matches
zstd_ldm.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 * All rights reserved.
4 *
5 * This source code is licensed under both the BSD-style license (found in the
6 * LICENSE file in the root directory of this source tree) and the GPLv2 (found
7 * in the COPYING file in the root directory of this source tree).
8 * You may select, at your option, one of the above-listed licenses.
9 */
10
11#ifndef ZSTD_LDM_H
12#define ZSTD_LDM_H
13
14#if defined (__cplusplus)
15extern "C" {
16#endif
17
18#include "zstd_compress_internal.h" /* ldmParams_t, U32 */
19#include "../zstd.h" /* ZSTD_CCtx, size_t */
20
21/*-*************************************
22* Long distance matching
23***************************************/
24
25#define ZSTD_LDM_DEFAULT_WINDOW_LOG ZSTD_WINDOWLOG_LIMIT_DEFAULT
26
28 ldmState_t* state, const BYTE* ip,
29 const BYTE* iend, ldmParams_t const* params);
30
46 ldmState_t* ldms, rawSeqStore_t* sequences,
47 ldmParams_t const* params, void const* src, size_t srcSize);
48
67size_t ZSTD_ldm_blockCompress(rawSeqStore_t* rawSeqStore,
68 ZSTD_matchState_t* ms, seqStore_t* seqStore, U32 rep[ZSTD_REP_NUM],
69 ZSTD_paramSwitch_e useRowMatchFinder,
70 void const* src, size_t srcSize);
71
79void ZSTD_ldm_skipSequences(rawSeqStore_t* rawSeqStore, size_t srcSize,
80 U32 const minMatch);
81
82/* ZSTD_ldm_skipRawSeqStoreBytes():
83 * Moves forward in rawSeqStore by nbBytes, updating fields 'pos' and 'posInSequence'.
84 * Not to be used in conjunction with ZSTD_ldm_skipSequences().
85 * Must be called for data with is not passed to ZSTD_ldm_blockCompress().
86 */
87void ZSTD_ldm_skipRawSeqStoreBytes(rawSeqStore_t* rawSeqStore, size_t nbBytes);
88
94
99size_t ZSTD_ldm_getMaxNbSeq(ldmParams_t params, size_t maxChunkSize);
100
111 ZSTD_compressionParameters const* cParams);
112
113#if defined (__cplusplus)
114}
115#endif
116
117#endif /* ZSTD_FAST_H */
unsigned char BYTE
Definition: mem.h:58
unsigned int U32
Definition: mem.h:69
#define ZSTD_REP_NUM
Definition: zstd_internal.h:68
void ZSTD_ldm_fillHashTable(ldmState_t *state, const BYTE *ip, const BYTE *iend, ldmParams_t const *params)
Definition: zstd_ldm.c:271
void ZSTD_ldm_skipSequences(rawSeqStore_t *rawSeqStore, size_t srcSize, U32 const minMatch)
Definition: zstd_ldm.c:589
void ZSTD_ldm_adjustParameters(ldmParams_t *params, ZSTD_compressionParameters const *cParams)
Definition: zstd_ldm.c:135
size_t ZSTD_ldm_blockCompress(rawSeqStore_t *rawSeqStore, ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], ZSTD_paramSwitch_e useRowMatchFinder, void const *src, size_t srcSize)
Definition: zstd_ldm.c:666
size_t ZSTD_ldm_generateSequences(ldmState_t *ldms, rawSeqStore_t *sequences, ldmParams_t const *params, void const *src, size_t srcSize)
Definition: zstd_ldm.c:511
size_t ZSTD_ldm_getMaxNbSeq(ldmParams_t params, size_t maxChunkSize)
Definition: zstd_ldm.c:165
void ZSTD_ldm_skipRawSeqStoreBytes(rawSeqStore_t *rawSeqStore, size_t nbBytes)
Definition: zstd_ldm.c:649
size_t ZSTD_ldm_getTableSize(ldmParams_t params)
Definition: zstd_ldm.c:155