~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/lib/zstd/compress/zstd_ldm.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /lib/zstd/compress/zstd_ldm.h (Version linux-6.11.5) and /lib/zstd/compress/zstd_ldm.h (Version linux-5.14.21)


  1 /*                                                  1 
  2  * Copyright (c) Yann Collet, Facebook, Inc.      
  3  * All rights reserved.                           
  4  *                                                
  5  * This source code is licensed under both the    
  6  * LICENSE file in the root directory of this     
  7  * in the COPYING file in the root directory o    
  8  * You may select, at your option, one of the     
  9  */                                               
 10                                                   
 11 #ifndef ZSTD_LDM_H                                
 12 #define ZSTD_LDM_H                                
 13                                                   
 14                                                   
 15 #include "zstd_compress_internal.h"   /* ldmPa    
 16 #include <linux/zstd.h>   /* ZSTD_CCtx, size_t    
 17                                                   
 18 /*-*************************************          
 19 *  Long distance matching                         
 20 ***************************************/          
 21                                                   
 22 #define ZSTD_LDM_DEFAULT_WINDOW_LOG ZSTD_WINDO    
 23                                                   
 24 void ZSTD_ldm_fillHashTable(                      
 25             ldmState_t* state, const BYTE* ip,    
 26             const BYTE* iend, ldmParams_t cons    
 27                                                   
 28 /*                                                
 29  * ZSTD_ldm_generateSequences():                  
 30  *                                                
 31  * Generates the sequences using the long dist    
 32  * Generates long range matching sequences in     
 33  * of the source. `sequences` must be large en    
 34  * which can be checked with `ZSTD_ldm_getMaxN    
 35  * @returns 0 or an error code.                   
 36  *                                                
 37  * NOTE: The user must have called ZSTD_window    
 38  * they have, even if they pass it to ZSTD_ldm    
 39  * NOTE: This function returns an error if it     
 40  *       sequences.                               
 41  */                                               
 42 size_t ZSTD_ldm_generateSequences(                
 43             ldmState_t* ldms, rawSeqStore_t* s    
 44             ldmParams_t const* params, void co    
 45                                                   
 46 /*                                                
 47  * ZSTD_ldm_blockCompress():                      
 48  *                                                
 49  * Compresses a block using the predefined seq    
 50  * block compressor. The literals section of e    
 51  * secondary block compressor, and those seque    
 52  * predefined sequences. Returns the length of    
 53  * Updates `rawSeqStore.pos` to indicate how m    
 54  * `rawSeqStore.seq` may also be updated to sp    
 55  * blocks.                                        
 56  * @return The length of the last literals.       
 57  *                                                
 58  * NOTE: The source must be at most the maximu    
 59  * sequences can be any size, and may be longe    
 60  * they are longer than the block, the last se    
 61  * two. We handle that case correctly, and upd    
 62  * NOTE: This function does not return any err    
 63  */                                               
 64 size_t ZSTD_ldm_blockCompress(rawSeqStore_t* r    
 65             ZSTD_matchState_t* ms, seqStore_t*    
 66             ZSTD_paramSwitch_e useRowMatchFind    
 67             void const* src, size_t srcSize);     
 68                                                   
 69 /*                                                
 70  * ZSTD_ldm_skipSequences():                      
 71  *                                                
 72  * Skip past `srcSize` bytes worth of sequence    
 73  * Avoids emitting matches less than `minMatch    
 74  * Must be called for data that is not passed     
 75  */                                               
 76 void ZSTD_ldm_skipSequences(rawSeqStore_t* raw    
 77     U32 const minMatch);                          
 78                                                   
 79 /* ZSTD_ldm_skipRawSeqStoreBytes():               
 80  * Moves forward in rawSeqStore by nbBytes, up    
 81  * Not to be used in conjunction with ZSTD_ldm    
 82  * Must be called for data with is not passed     
 83  */                                               
 84 void ZSTD_ldm_skipRawSeqStoreBytes(rawSeqStore    
 85                                                   
 86 /* ZSTD_ldm_getTableSize() :                      
 87  *  Estimate the space needed for long distanc    
 88  *  disabled.                                     
 89  */                                               
 90 size_t ZSTD_ldm_getTableSize(ldmParams_t param    
 91                                                   
 92 /* ZSTD_ldm_getSeqSpace() :                       
 93  *  Return an upper bound on the number of seq    
 94  *  the long distance matcher, or 0 if LDM is     
 95  */                                               
 96 size_t ZSTD_ldm_getMaxNbSeq(ldmParams_t params    
 97                                                   
 98 /* ZSTD_ldm_adjustParameters() :                  
 99  *  If the params->hashRateLog is not set, set    
100  *  windowLog and params->hashLog.                
101  *                                                
102  *  Ensures that params->bucketSizeLog is <= p    
103  *  params->hashLog if it is not).                
104  *                                                
105  *  Ensures that the minMatchLength >= targetL    
106  */                                               
107 void ZSTD_ldm_adjustParameters(ldmParams_t* pa    
108                                ZSTD_compressio    
109                                                   
110                                                   
111 #endif /* ZSTD_FAST_H */                          
112                                                   

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php