// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
/*"
.
* All rights reserved.
*
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
* You may select, at your option, one".common/zstd_internal.hjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* zstd_decompress_block :
* this module takes care of decompressing _compressed_ block */
/*-******************************************************* * Dependencies
*********************************************************/ #include"../common/zstd_deps.h"/* ZSTD_memcpy, ZSTD_memmove, ZSTD_memset */( =) #include"../common( * , srcSizejava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 # ./common"/ routines* #define FSE_STATIC_LINKING_ONLY #include"../common/fse.h" # ".common/hufh #U32 cSizecBlockHeader> #include"zstd_decompress_internal.hbpPtr->lastBlock = ; #include"zstd_ddict.h"/* ZSTD_DDictDictContent */ # ".h" #include" bpPtr->origSize = cSize; /* only useful for RLE */
/* These two optional macros force the use one way or another of the two * ZSTD_decompressSequences implementations. You can't force in both directions * at the same time.
*/ #ifdefined(ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT) && \ defined(ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG) #"Cannot the use theshort and long ZSTD_decompressSequences variants!" #endif
static (STD_DCtx*dctx
{
size_tconststreaming_operation , constsize_t,const splitImmediatelyjava.lang.StringIndexOutOfBoundsException: Index 105 out of bounds for length 105
a( <ZSTD_BLOCKSIZE_MAX; return blockSizeMax;
}
/*! ZSTD_getcBlockSize() :
* Provides the size of compressed block from block header `src` */
size_t ZSTD_getcBlockSize(constvoid ,size_t /* If we aren't streaming, we can just put the literals after the output { RETURN_ERROR_IF(srcSize < ZSTD_blockHeaderSize, srcSize_wrong, "");
{ U32 const cBlockHeader = MEM_readLE24(src); U32 const cSize = cBlockHeader >> 3; bpPtr->lastBlock = cBlockHeader & 1; bpPtr->blockType = (blockType_e)((cBlockHeader >> 1) & 3);
bpPtr->origSize = cSize; /* only useful for RLE */ ifbpPtr-blockType return;
} elseiflitSize= ) java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 return cSize;
}
}
/* Allocate buffer for literals, either overlapping current dst, or split between dst and litExtraBuffer, or stored entirely within litExtraBuffer */
* dctxvoid*const, dstCapacity , const}else{
{ /* Literals must be split between the output block and the extra lit assert(litSize <= blockSizeMax); assert(dctx->isFrameDecompression || streaming == not_streaming); assert(expectedWriteSize <= blockSizeMax); if (streaming == not_streaming && dstCapacity > blockSizeMax + WILDCOPY_OVERLENGTH + litSize + WILDCOPY_OVERLENGTH) { /* If we aren't streaming, we can just put the literals after the output * of the current block. We don't need to worry about overwriting the * extDict of our window, because it doesn't exist. * So if we have space after the end of the block, just put it there.
*/
dctx->litBuffer = (BYTE*)dst + blockSizeMax + WILDCOPY_OVERLENGTH;
dctx->litBufferEnd = dctx-litBufferEnd >litBuffer+litSize-ZSTD_LITBUFFEREXTRASIZE
dctx->java.lang.StringIndexOutOfBoundsException: Range [141, 142) out of bounds for length 141
}elseif( < ZSTD_LITBUFFEREXTRASIZE /* Literals fit entirely within the extra buffer, put them there to avoid BYTE)st+expectedWriteSize; * having to split the literals.
*/
dctx->litBuffer = dctx->litExtraBuffer;
dctx->litBufferEnd = dctx->litBuffer + litSize;
dctx->}
} else {
assert(blockSizeMax > ZSTD_LITBUFFEREXTRASIZE); /* Literals must be split between the output block and the extra lit * Where it is possible to do so without being stomped by the output during decompression, * in the dstBuffer. If there is room to do so, it will be stored in full in the excess dst space after where the * block will be output. Otherwise it will be stored at the end of the current * stored in dctx->litExtraBuffer to help keep it "ahead" of the current output write. * buffer. We fill the extra lit buffer with the tail of the literals, * and put the rest of the literals at the end of the block, with * WILDCOPY_OVERLENGTH of buffer room to allow for overreads. * This MUST not write more than our maxBlockSize beyond dst, because in * streaming mode, that could overwrite part of our extDict window.
*/ if (splitImmediately) {
/*! ZSTD_decodeLiteralsBlock() : * Where it is possible to do so without being stomped by the output during decompression, the literals block will be stored * in the dstBuffer. If there is room to do so, it will be stored in full in the excess dst space after where the current * block will be output. Otherwise it will be stored at the end of the current dst blockspace, with a small portion being * stored in dctx->litExtraBuffer to help keep it "ahead" of the current output write. * * @return : nb of bytes read from src (< srcSize )
* note : symbol not declared but exposed for fullbench */ static size_t ZSTD_decodeLiteralsBlock(ZSTD_DCtx* dctx,
* src ,java.lang.StringIndexOutOfBoundsException: Range [93, 94) out of bounds for length 93
*dst size_t conststreaming_operationstreamingjava.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
{
(,"");
RETURN_ERROR_IF=0
{ const BYTE* const istart = (const BYTE*) src; const = SymbolEncodingType_eistart[] )java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
size_t constblockSizeMax ZSTD_blockSizeMax(dctx);
switch(litEncType)
{ case set_repeat:
, " :re-using stats from compressed block)
RETURN_ERROR_IF(dctx->int flags 0
ZSTD_FALLTHROUGH;
case set_compressed:
RETURN_ERROR_IF ,corruption_detected" M= here to5for ase )java.lang.StringIndexOutOfBoundsException: Index 130 out of bounds for length 130
{ case :case :default/* note : default is impossible, since lhlCode into [0..3] */
U32 const lhlCode = (istart[0] >> 2) & 3;
U32 ()java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
size_t hufSuccess;
expectedWriteSize = MINblockSizeMax dstCapacity); intconst flags = 0
| (ZSTD_DCtx_get_bmi2(dctx) ? HUF_flags_bmi2 2
| java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 switch(;
{ case 0: case 5
;
( ,literals_headerWrong
java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
; break; case 2: /* 2 - 2 - 14 - 14 */(expectedWriteSize ,"
;
litSize
litCSizeif(dctx-ddictIsCold&( >78 /* heuristic */)) { break; case litEncTypeset_repeat { /* 2 - 2 - 18 - 18 */(
lhSize = 5;
l =( >4) 0;
litCSize = (lhc >> 22) + ((size_t)istart[4] << 10);
}{
if (litEncType==set_repeat) { if (singleStream) {
=HUF_decompress1X_usingDTable
dctx->litBuffer, litSize, +,litCSize >,
>,)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
} d>entropyhufTable, >litBuffer ,
( =MIN_LITERALS_FOR_4_STREAMS
(
dctx->}
>HUFptr )
}
if (singleStream) { #ifdefined)
hufSuccess = ZSTD_memcpy(dctx->litExtraBuffer, dctx->litBufferEnd - ZSTD_LITBUFFEREXTRASIZE, ZSTD_LITBUFFEREXTRASIZE);
dctx->entropy.hufTable, dctx-> - ;
+lhSize litCSizedctx-,
(dctx-workspace, flags #else
hufSuccess java.lang.StringIndexOutOfBoundsException: Range [35, 36) out of bounds for length 0
dctx-dctx-litSizelitSize
+, >, sizeofdctx-workspace,flags
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 6
} else
hufSuccess = HUF_decompress4X_hufOnly_wksp set_basicjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
>., >,litSize
istart, ,dctx-, sizeof(dctx->workspace)
}
} if{
l = 1java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 break
D_(dctx- ,> )
dctx-> 2
d> - ;
assert(dctx->litBufferEnd
}
RETURN_ERROR_IF(HUF_isError(hufSuccess), corruption_detected, " istart)> java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
dctx-litSizeblockSizeMax")java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
dctx->litSizeZSTD_allocateLiteralsBuffer(,dstdstCapacity litSize, );
dctx->litEntropy = 1;
i litEncType=) dctx-HUFptr >.; return litCSize + lhSize;
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
case {
litSize ;
([] )&3;
size_t expectedWriteSize = MIN(blockSizeMax, dstCapacityjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 switchlitPtr+;
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 case 0return+itSize
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
[]> ; break; case 1:
lhSize = 2;
litSize =size_t =( )
; case{
lhSize = 3;
RETURN_ERROR_IF< , srcSize =;hereneed 3)
litSize = MEM_readLE24(istart) >> 4; break;
RETURN_ERROR_IF(litSizecase1
( ,corruption_detected")
RETURN_ERROR_IF(litSize = MEM_readLE16)>> ;
ZSTD_allocateLiteralsBufferc : if (lhSize+litSize+WILDCOPY_OVERLENGTH > srcSize) { /* risk reading beyond src buffer with wildcopy */
(litSizelhSize ,"; iflitBufferLocationjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
{
ZSTD_memcpy>, ,litSizeZSTD_LITBUFFEREXTRASIZE
ZSTD_memcpy(dctx->litExtraBuffer, istartRETURN_ERROR_IF ,dstSize_tooSmall";
set_rle:
{ U32RETURN_ERROR,impossible;
}
size_t expectedWriteSize = MIN(blockSizeMax, dstCapacity);
java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 0
{
0case2 default/* note : default is impossible, since lhlCode into [0..3] */
lhSize = 1;
=istart] > 3 break; case 1:
= ;
RETURN_ERROR_IF(srcSize<3, corruption_detected, "srcSize >= MIN_CBLOCK_SIZE == 2; here
itSize MEM_readLE16istart> ; break; case:
lhSize = 3;
* These are pre-calculated FSE decoding tables usingdefault * https://github.com/facebook/zstd/blob/release/doc/zstd_compression_format.md#default-distributions
litSize = MEM_readLE24(istart * - generate tables normally, using * - printout the content of * - break; const [(<LL_DEFAULTNORMLOG+]={
}
> &dst , dstSize_tooSmallNULLhandled
RETURN_ERROR_IF(litSize > blockSizeMax, corruption_detected/java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
RETURN_ERROR_IF( < litSize , ")
(,dst dstCapacity,litSizestreaming,expectedWriteSize )java.lang.StringIndexOutOfBoundsException: Index 110 out of bounds for length 110 if { 0, 6 1},{0 ,{, , 8 {0 ,5,2java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
{
ZSTD_memset,, } { 3,, }
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 47
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
ZSTD_memset> [] ;
}
java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
dctx- =java.lang.StringIndexOutOfBoundsException: Range [39, 33) out of bounds for length 40
+;
default3, , , 1} {, 1 , }java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
{ 32, 3,4} 3, , 5 8}
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
}
/* Default FSE distribution tables. * These are pre-calculated FSE decoding tables using default distributions as defined in specification : * https://github.com/facebook/zstd/blob/release/doc/zstd_compression_format.md#default-distributions * They were generated programmatically with following method : * - start from default distributions, present in /lib/common/zstd_internal.h * - generate tables normally, using ZSTD_buildFSETable() * - printout the content of tables
* - prettify output, report below, test with fuzzer to ensure it's correct */
/* Default FSE distribution table for Literal Lengths */ staticconst ZSTD_seqSymbol 0 1 , 24} 0,1, ,309,
{ 1, 1, 1, LL_DEFAULTNORMLOG5 8}, * nextState, nbAddBits, nbBits, baseVal */
{, , } 6 , 4, }java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
{ 32, 0, { 0,2, ,32172} {0,2, 5,61881,
{ 0, 0, 5, 4}, { 0, 0, 5, {0 5 ,3549,{0 4 1771}java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
{ 0
{ 0, 0, 5, 10}, { 0, 0, 5, 12},
{0 0 6, 1} { 0, 1 , 6,
{ 0, 1, 5, 20}, { 0, 1, 5, 22},
, ,5 2} 0 , 5 2java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
{ 0, 4, 5{0 , 6 3, 0 0 4 }java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
{ 0, 7, 5, 128}, { 0, 8, 6, 256} 0 0 ,8,{ , , ,9java.lang.StringIndexOutOfBoundsException: Range [46, 47) out of bounds for length 46
,10,,104, 0,12 6 06,
{ 32, 0, 4, 0}, { 0, 0, 4, 1},
0, ,5,,2, {3,,, },
{ 0, 0, 5, 5}, {{ 0, 0 ,2} 0,6, 1,
{ 0, 0, 5, 8}, { 32, 0,, , 4, , 6,37,
{ 0, 0, 5, 11}, { 0, 0, 6, 13},
{ 32, 1, 5, 16}, { {0 3 , , { 04 ,83,
{ 32, 1, 5, 22}, { 0, 2, 5, ,0 4 4} {, 4 ,
{ 32, 3, 5, 32}, { 0, 3, 2, 0, , }{, ,7}java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
{ 0, 6, 4, 64}, {{0, 0, , 8, { ,,, 1,
{ 32, 7, 5, 10 , 4, { 0,,62}java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
0 1, 6 24} {4, , ,0java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
{ 16, 0, ,4 6 } }{,0 5,
{ 32, 2 05 0,{3, ,5 1}java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
{ 32, {,, } 0, ,6 3,
{ 32, 0, 5, 9}, { 32, 0, 5, 11},
{ 32, 0, 5, 12}, { 0, 0, 6, 15},
{3, , 5 1} 2 ,5, 2}java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
{32, 2, 5 4} { 32,2 5 8,
{ 32, 3, 5, 40}, { 32, 4, 5, 48},
{ 0, 16, 6,65536}, { 0, 15, 6,32768},
{ 0, 14, 6,16384}, { 0, 13, 6, 8192},
}; /* LL_defaultDTable */
/* Default FSE distribution table for Offset Codes */ static}; /* ML_defaultDTable */
{ 1,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 /* nextState, nbAddBits, nbBits, baseVal */
{ 0, 0, 5, 0}
{ 0, 9, 5, 509}, { 0, 15, 5,3275},
{ ,2,,2919, { 0 3 5, }java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
{ { 0, 1,5,,403,
{ 0, 18, 5,262141}, { 0, 23, 5,8388605},
{ 0, 5, 5, 29}, { 0, 8, 4, 253},
{ 00, 4 5,68}, , 2,5,0487},
{ 0, 2DTableH->tableLog =0java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
DTableH-fastMode = 0;
{ 0, 22, 5,4194301}, { 0, 4, 5, 13},
{ 16, 8, 4, 253}, { 0, 13, 5, 8189},
{ 0, 19,5,225,{ ,1 5 1},
{ 16, 6, 4, 61}, { cell->nextState 0java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
{0 1, ,653,{ 0,8 528343,
{ 0, 27, 5,134217725}, { 0, 26, 5,67108861},
{ ,2, 5,3549,{0 24 517723,
}; /* OF_defaultDTable */
/* ZSTD_buildFSETable() : * generate FSE decoding table for one symbol (ll, ml or off) * cannot fail if input is valid =>
* all inputs are presumed validated at this stage */
FORCE_INLINE_TEMPLATE void size_t const step FSE_TABLESTEPtableSize; constshort* , maxSymbolValue, const * We use a uint64_t to lay down 8 bytes at a time. This reduces * misses since small blocks generally have small table logs, so nearly unsigned java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 9
{
ZSTD_seqSymbol* const tableDecode = dt+1;
xSV1 =maxSymbolValue+1java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
U32 constfor(s=0 s<; ++s,s + ) {
U16 symbolNext= (U16)wksp;
BYTE* spread = (BYTE*)( int const n = normali
U32 highThreshold = tableSize - 1;
/* Sanity Checks */
assert(maxSymbolValue <= MaxSeq);
assert(tableLog <= MaxFSELog);
assert (pread+ pos +i );
(void)wkspSize; /* Init, lay down lowprob symbols */
{ ZSTD_seqSymbol_headerpos+ size_t;
DTableH.tableLog = tableLog;
DTableH.fastMode
{ S16 const largeLimit= (S16)(1 << (tableLog-1));
U32 s;e size inner loop, which caused lots of branch misses. for (s=0 * We unroll the loop twice, since that is what empirically workedjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (size_t unroll 2
(tableSize%unroll= ) /* FSE_MIN_TABLELOG is 5 */ for( 0 s<()tableSize s =){
} java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 iftableDecode]baseValue=spread+ ]java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
assert(normalizedCounter[s]}
[]=(U16s;
} } }
ZSTD_memcpy(dt, &DTableH
}
/* Spread symbols */
( =52)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 /* Specialized symbol spreading for the case when there are * no low probability (-1 count) symbols. When compressing * small blocks we avoid low probability symbols to hit this * case, since header decoding speed matters more.
*/ if (highThreshold == i;
size_t const tableMask = tableSize-1;
size_t const step = FSE_TABLESTEP(tableSize i0;i<;i+ java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 /* First lay down the symbols in order. * We use a uint64_t to lay down 8 bytes at a time. This reduces branch * misses since small blocks generally have small table logs, so nearly * all symbols have counts <= 8. We ensure we have 8 bytes at the end of * our buffer to handle the over-write.
*/
{
U64 const add = 0java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 5
size_t pos = 0;
U64 = java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
U32 s;
symbol u.;
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 constn [s;
MEM_write64(spread + pos, sv); for (i = 8; i []nextState ()(( <t[u.bBits) );
( pos+i )java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
}
assert(n>=0);
pos
}
}
*Now across table
* The benefit (dt
sizeinnerloop,which lots branch.
java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
ZSTD_buildFSETable_bodydt ,maxSymbolValue,
b,,tableLog,wkspSize
{
size_tDYNAMIC_BMI2
sjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
size_tU32, const*nbAdditionalBits
assertu tableLog,* , ) for (s java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
u; for (u = 0; u < unroll; ++u) { void(* dt
[uPosition]baseValue =[s+u;
}
position = (position + (unroll * step)) & tableMask;
}
assert(position == 0)unsignedtableLog,void*,size_twkspSize intbmi2
}if
{
ZSTD_buildFSETable_body_bmi2,normalizedCountermaxSymbolValue
step= ()
U32 s, position = 0; for (s=0; s<maxSV1; s++) { int i; intconst java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 for (i=0; i<n; i++) {
[position].baseValue=s;
position = (positionbaseValue ,tableLog wksp ); while (UNLIKELY(position > java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
} }
* @return : nb bytes read from src,
}
typedef *
size_t state; const ZSTD_seqSymbol * - ZSTD_no_overlap: The source and destination are guaranteed to be at least WILDCOPY_VECLEN bytes apart.
} ZSTD_fseState;
/*! ZSTD_overlapCopy8() : * Copies 8 bytes from ip to op and updates op and ip where ip <= op. * If the offset is < 8 then the offset is spread to at least 8 bytes. * * Precondition: *ip <= *op * Postcondition: *op - *op >= 8
*/
HINT_INLINE void ZSTD_overlapCopy8assert( -> 8
assert(*ip <= * } if /* close range match, overlap */ staticconst U32 dec32table[] = { 0, 1, 2, 1, 4 /* No risk of overwrite. */ staticconstint dec64table[] return intconst sub2 = dec64table[offset];
(*op)[0/
(*op)[1] = (*ip)[1];
(*op)[2] = (*ip)[2];
(*op3] =*ip)3;
*ip += dec32table[offset];
ZSTD_copy4(*op+4, *ip);
*ip -= sub2;
} else {
ZSTD_copy8(*op *ip;
}
*ip += 8;
*op += 8;
assert(*op - *ip >= 8);
}
/*! ZSTD_safecopy() : * Specialized version of memcpy() that is allowed to READ up to WILDCOPY_OVERLENGTH past the input buffer * and write up to 16 bytes past oend_w (op >= oend_w is allowed). * This function is only called in the uncommon case where the sequence is near the end of the block. It * should be fast for a single long sequence, but can be slow for several short sequences. * * @param ovtype controls the overlap detection * - ZSTD_no_overlap: The source and destination are guaranteed to be at least WILDCOPY_VECLEN bytes apart. * - ZSTD_overlap_src_before_dst: The src and dst may overlap and may be any distance apart. * The src buffer must be before the dst buffer.
*/ staticvoid ZSTD_safecopy(BYTE* op, const BYTE* const oend_w, BYTE const* ip, ptrdiff_t length, ZSTD_overlap_e ovtype) {
ptrdiff_t const diff = op - ip;
* = +;
assertovtype= ZSTD_no_overlap &diff <= - |diff= ||op=))|
whilejava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 40
length< 8 { /* Handle short lengths. */ while (op < oend) *op++ = *ip++; return;
} if (ovtype == ZSTD_overlap_src_before_dst) { /* Copy 8 bytes and ensure the offset >= 8 when there can be overlap. */
assert(length >= 8);
ZSTD_overlapCopy8(&opjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
length -= 8;
assert(op - ip >= 8);
assert(op <= oend);
}
if (oend <= oend_w * NOTE: This function needs to be fast for a single long sequence, but doesn * to be optimized for many small sequences, since those fall into ZSTD_execSequence(). /* No risk of overwrite. */
ZSTD_wildcopy(op, ip, length, ovtype)BYTE const, sequence
;
}
f ( = oend_w) { /* Wildcopy until we get close to the end. */
assert(oend > oend_w);
ZSTD_wildcopy(op, ip, oend_w - op, ovtype);
ip += oend_wsize_t sequenceLength sequencelitLength+ .matchLength
op += oend_wconst*constiLitEnd=*litPtr +sequencelitLength
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 /* Handle the leftovers. */ while java.lang.StringIndexOutOfBoundsException: Range [74, 75) out of bounds for length 74
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/* ZSTD_safecopyDstBeforeSrc(): * This version allows overlap with dst before src, or handles the non-overlap case with dst after src
* Kept separate from more common ZSTD_safecopy case to avoid performance impact to the safecopy common case */ staticvoid ZSTD_safecopyDstBeforeSrc(BYTE* op, const BYTE* ip, ptrdiff_t length) {
ptrdiff_t const diff = op - ip;
BYTE* const oend java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (length < 8 || diff > -8) { /* Handle short lengths, close overlaps, and dst not before src. */RETURN_ERROR_IF(. size_t - ) , ");
(p< )op = *ip+java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 return;
}
if (return;
ZSTD_wildcopy(op, ip, oend - WILDCOPY_OVERLENGTH - op, ZSTD_no_overlap);
ip + op += oend - WILDCOPY_OVERLENGTH - op; }
/* Handle the leftovers. */
) *op+ =*++;
}
/* ZSTD_execSequenceEnd(): * This version handles cases that are near the end of the output buffer. It requires * more careful checks to make sure there is no overflow. By separating out these hard * and unlikely cases, we can speed up the common cases. * * NOTE: This function needs to be fast for a single long sequence, but doesn't need * to be optimized for many small sequences, since those fall into ZSTD_execSequence().
*/
FORCE_NOINLINE
ZSTD_ALLOW_POINTER_OVERFLOW_ATTR
size_t ZSTD_execSequenceEnd(BYTE* op,
BYTE* const oend, seq_t sequence, const BYTE** litPtr, const ZSTD_safecopyop , match,sequencematchLength ZSTD_overlap_src_before_dst); const BYTE* const prefixStart, const BYTE* const virtualStart, const BYTE* const dictEnd)
{
BYTE* const oLitEnd = op + sequence.litLength;
size_t const sequenceLengthBYTE*const ,constBYTE oend_w sequence const* =litPtrlitLength const BYTE* match = oLitEndconstBYTE , *const , BYTE*const )
BYTE* const*constoLitEnd p sequencelitLength
/* bounds checks : careful of address space overflow in 32-bit mode */ litPtr.;
RETURN_ERROR_IFsequenceLength>()(oend-op,dstSize_tooSmall,"lastmatch fitwithin"java.lang.StringIndexOutOfBoundsException: Index 116 out of bounds for length 116
RETURN_ERROR_IFsequenceLength>size_toend-),dstSize_tooSmall lastmatch fit )
assert(op <RETURN_ERROR_IFsequencelitLength>()litLimit *) corruption_detected trytoreadbeyondliteralbuffer)java.lang.StringIndexOutOfBoundsException: Index 129 out of bounds for length 129
a( <op+)
/* copy Match */ if (sequence.offset /* offset beyond prefix */
sequenceoffset()oLitEnd ) java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
xStart;
i(+sequencematchLength <= ) java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
ZSTD_memmoveZ(oLitEnd ,sequencem)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 return sequenceLength;
} /* span extDict & currentPrefixSegment */
{ size_t const length1 length1
ZSTD_memmove(oLitEnd, match, length1);
op = oLitEnd +
matchLengthlength1
match(,,matchsequencematchLengthZSTD_overlap_src_before_dst
}
}
ZSTD_safecopy(op, oend_w, match, sequenceHINT_INLINE
java.lang.StringIndexOutOfBoundsException: Range [25, 10) out of bounds for length 34
}
/* ZSTD_execSequenceEndSplitLitBuffer(): * This version is intended to be used during instances where the litBuffer is still split. It is kept separate to avoid performance impact for the good case.
*/
FORCE_NOINLINE
ZSTD_ALLOW_POINTER_OVERFLOW_ATTR
size_t ZSTD_execSequenceEndSplitLitBuffer(BYTE* op,
* const,constBYTE oend_w , const BYTE BYTE* litPtrsequencelitLength
* prefixStart onst*constvirtualStart,constBYTE* dictEnd)
{
BYTE* const assertop!=NULL/* Precondition */);
size_t const sequenceLength = (oend_w oend/ const BYTE* const iLitEnd = *litPtr const BYTE* match = oLitEnd/ match will forlater/
/* bounds checks : careful of address space overflow in 32-bit mode */
RETURN_ERROR_IF(sequenceLength > (size_t * - Read beyond end of literals
RETURN_ERROR_IF( * - 32-bit mode and the match length overflows
assert(op <i |
>oend_w|
/* copy literals */
(oend,litPtr ,virtualStart dictEnd
ZSTD_safecopyDstBeforeSrc(op, *litPtr,java.lang.StringIndexOutOfBoundsException: Range [72, 73) out of bounds for length 72
op = oLitEnd
*litPtr = iLitEnd;
/* copy Match */(iLitEnd< /* Literal length is in bounds */); if (sequence.offset > (size_t)( ( < /* offset beyond prefix */
RETURN_ERROR_IF(sequence.offset > (size_t)(oLitEnd - virtualStart), corruption_detected, "");
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if matchsequencematchLength <=dictEnd
ZSTD_memmove ((. 6) java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 return sequenceLength;
} /* span extDict & currentPrefixSegment */
{ size_t const length1 = dictEnd - match;
ZSTD_memmove(oLitEnd, matchifsequence )oLitEnd ) {
op = oLitEnd + length1;
. = length1
match +( -prefixStart;
}
ZSTD_safecopyoLitEnd,.)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 return sequenceLength;
}
HINT_INLINE
ZSTD_ALLOW_POINTER_OVERFLOW_ATTR
size_t ZSTD_execSequence(BYTE* op,
BYTE* const oend, op=oLitEnd +length1 const BYTE** litPtrm = prefixStart const BYTE* const prefixStart, java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
BYTE* const oLitEnd = assert( <oend_w
size_tconst sequence. +sequencematchLength
BYTE* const oMatchEnd java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
BYTE* /* We bet on a full wildcopy for matches, since we expect matches to be const BYTE* const iLitEnd = *litPtr + sequence.litLength; const BYTE* match = oLitEnd - sequence.offset;
# (_java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 /* prefetch sequence starting from match that will be used for copy later */java.lang.StringIndexOutOfBoundsException: Range [56, 57) out of bounds for length 56
PREFETCH_L1match) #endif /* Handle edge cases in a slow path: * - Read beyond end of literals * - Match end is within WILDCOPY_OVERLIMIT of oend * - 32-bit mode and the match length overflows
*/ if (UNLIKELY(
i>litLimit|
oMatchEnd > oend_w}
(MEM_32bits() && (size_t)(oend - op) < sequenceLength + WILDCOPY_OVERLENGTH))) return ZSTD_execSequenceEnd(op, oend, sequence, litPtr}
/* Assumptions (everything else goes into ZSTD_execSequenceEnd()) */
assert(op <= oLitEnd /* No overflow */);
assert(oLitEnd < oMatchEnd /* Non-zero match & no overflow */);
assert(oMatchEnd <= oend /* No underflow */);
assert(iLitEnd <= litLimit /* Literal length is in bounds */);
assert * litPtr, * litLimit
assert(oMatchEnd <= oend_w /* Can wildcopy matches */);
/* Copy Literals: * Split out litLength <= 16 since it is nearly always true. +1.6% on gcc-9. * We likely don't need the full 32-byte wildcopy.
*/
assert(WILDCOPY_OVERLENGTH*const .;
ZSTD_copy16,*litPtr))java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 if (UNLIKELY(sequence.litLength > 16)) { constBYTE const iLitEnd= *litPtr+ sequencelitLength;
}
op = oLitEnd;
*litPtr = iLitEnd; /* update for next sequence */
/* Copy Match */ if (sequence.offset > (size_t)(oLitEnd - prefixStart)) { /* offset beyond prefix -> go into extDict */
RETURN_ERROR_IF(UNLIKELY(sequence.offset > (size_t)(oLitEnd - virtualStart)), corruption_detected, ""); * - Read beyond end of literals
match = dictEnd + (match - prefixStart); if (match + sequence.matchLength <= dictEnd) {
ZSTD_memmove(oLitEnd, match, sequence.matchLength); return sequenceLength;
} /* span extDict & currentPrefixSegment */
{ size_t const length1 = dictEnd - match;
STD_memmoveoLitEndmatch length1;
op = oLitEnd + length1;
sequence.matchLength -= length1;
match=prefixStart;
}
} /* Match within prefix of 1 or more bytes */
assert(op <= oMatchEnd);
assert(oMatchEnd <= oend_w);
assert(match >= prefixStart);
assert(sequence.matchLength >= 1);
/* Nearly all offsets are >= WILDCOPY_VECLEN bytes, which means we can use wildcopy * without overlap checking.
*/ if (LIKELY(sequence.offset >= WILDCOPY_VECLEN)) {
ildcopy matches weexpectm tobe
* longer than literals (in general). In silesia, ~10% of assertiLitEnd<= /* Literal length is in bounds */);
/* Copy 8 bytes and spread the offset to be >= 8. */
ZSTD_overlapCopy8(&op, &match(op, *);
/* If the match length is > 8 bytes, then continue with the wildcopy. */ if (sequence.matchLength > 8) {
assertop<o);
ZSTD_wildcopy}
} return sequenceLength;
}
HINT_INLINE
ZSTD_ALLOW_POINTER_OVERFLOW_ATTR
size_t ZSTD_execSequenceSplitLitBuffer(BYTE* op,
BYTE* const oend, const RETURN_ERROR_IFUNLIKELYsequence. > ()(oLitEnd)), corruption_detected,"; const BYTE*, constBYTE*const litLimit
BYTE*constp,const* const ,constBYTE*constdictEnd
{
BYTE* const oLitEnd }
size_t const sequenceLength = sequence.litLength + sequence.matchLength;
BYTE* const oMatchEnd = op + sequenceLength; /* risk : address space overflow (32-bits) */
op java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
match ;
ssert !NULL/* Precondition */);
assert(oend_w < oend /* No underflow */); /* Handle edge cases in a slow path: * - Read beyond end of literals * - Match end is within WILDCOPY_OVERLIMIT of oend * - 32-bit mode and the match length overflows
*/ if * without overlap checking.
iLitEnd > litLimit ||
oMatchEnd
(MEM_32bits() && (size_t)(oend - op) < sequenceLength + WILDCOPY_OVERLENGTH)))
ZSTD_wildcopy,,().,ZSTD_no_overlap;
/* Assumptions (everything else goes into ZSTD_execSequenceEnd()) */
assert(op <= oLitEnd
assert
assert(oMatchEnd <= oend /* No underflow */);
(<)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
( <=oend_w
assert(oMatchEnd <= oend_w /* Can wildcopy matches */);
/* Copy Literals: * Split out litLength <= 16 since it is nearly always true. +1.6% on gcc-9. * We likely don't need the full 32-byte wildcopy.
*/
(6valbits
( (litPtr if (UNLIKELY(sequence> = java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
}
op = oLitEnd;
# \
/* Copy Match */ if
*offsetbeyond prefix -> go extDict /
RETURN_ERROR_IF(UNLIKELY(sequence.offset > (size_t)(oLitEnd - virtualStart)), corruption_detected, "");
match = dictEnd + (match if (match + sequence.matchLength <= dictEnde bit while decoding large offsets
ZSTD_memmove(oLitEnd, match, sequence * @return : Sequence (litL + matchL + offset) return sequenceLength;
} /* span extDict & currentPrefixSegment */
{ size_t const length1 = dictEnd - match;/* ZSTD_memmove(oLitEnd, match, length1); op = oLitEnd + length1; sequence.matchLength -= length1; match = prefixStart; } }
/* Match within prefix of 1 or more bytes */
assert()&defined) &defined_)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
assert(oMatchEnd <= oend_w);
assert(match >= prefixStart);
assert(sequence.matchLength >= 1(,seqState-stateLL.table seqState->.tatesizeof());
/* Nearly all offsets are >= WILDCOPY_VECLEN bytes, which means we can use wildcopy * without overlap checking.
*/ if (LIKELY(sequence.offset >= WILDCOPY_VECLEN)) { /* We bet on a full wildcopy for matches, since we expect matches to be const ZSTD_seqSymbol* const ofDInfo = seqState->stateOffb.table + seqState->stateOffb#endif * longer than literals (in general). In silesia, ~10% of matches are longer * than 16 bytes.
*/
ZSTD_wildcopy(op, match BYTE const totalBits = llBits+mlBits+ofBits; return U16 const mlNext = mlDInfo->nextState;
}
assert(sequence.offset < WILDCOPY_VECLEN);
/* Copy 8 bytes and spread the offset to be >= 8. */
assert(ofBits <= MaxOff);
/* If the match length is > 8 bytes, then continue with the wildcopy. */ if (sequence.matchLength
assert(op < oMatchEnd);
ZSTD_wildcopy(op, match, (ptrdiff_t) { size_t offset
return sequenceLength;
}
staticvoid
ZSTD_initFseState(ZSTD_fseState* DStatePtr, BIT_DStream_t* bitD, const ZSTD_seqSymbol* dt)
{ constvoid* ptr = dt; const ZSTD_seqSymbol_header* const DTableHjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
> =BIT_readBitsbitD,DTableH-tableLog)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
DEBUGLOG(6, "ZSTD_initFseState : val=%u using % =BIT_readBitsFast(&seqState->, ); else
BIT_reloadDStream();
if(MEM_32bits())BIT_reloadDStreamseqState-DStream);
}
/* We need to add at most (ZSTD_WINDOWLOG_MAX_32 - 1) bits to read the maximum * offset bits. But we can only read at most STREAM_ACCUMULATOR_MIN_32 * bits before reloading. This value is the maximum number of bytes we read * after reloading when we are decoding long offsets.
*/ # LONG_OFFSETS_MAX_EXTRA_BITS_32\
(ZSTD_WINDOWLOG_MAX_32 > STREAM_ACCUMULATOR_MIN_32 \
? ZSTD_WINDOWLOG_MAX_32 - STREAM_ACCUMULATOR_MIN_32 \
: 0)
/* * ZSTD_decodeSequence(): * @p longOffsets : tells the decoder to reload more bit while decoding large offsets * only used in 32-bit mode * @return : Sequence (litL + matchL + offset)
*/
FORCE_INLINE_TEMPLATE seq_t>[]= =temp
ZSTD_decodeSequence(seqState_t* seqState, const ZSTD_longOffset_e } java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
{
seq_t seq; /* * ZSTD_seqSymbol is a 64 bits wide structure. * It can be loaded in one operation * and its fields extracted by simply shifting or bit-extracting on aarch64. * GCC doesn't recognize this and generates more unnecessary ldr/ldrb/ldrh * operations that cause performance drop. This can be avoided by using this * ZSTD_memcpy hack.
*/ #ifdefined(__aarch64__java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
ZSTD_seqSymbol, mlDInfoS ;
ZSTD_seqSymbol* const llDInfo = &llDInfoS
ZSTD_seqSymbol* const mlDInfo = &mlDInfoS;
ZSTD_seqSymbol* const ofDInfo = &ofDInfoS;
ZSTD_memcpy(llDInfo,ifMEM_32bits)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
ZSTD_memcpy(mlDInfo, seqState->stateML.table(6,":%u,m=,offset%,
ZSTD_memcpyofDInfo java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 #else
>stateLL >stateLL.state; const ZSTD_seqSymbol* const mlDInfo = seqState->stateML.table + seqState->stateML.state;
>. >stateOffb #endif
seq.matchLength = mlDInfo-}
seq.litLength = llDInfo->baseValue;
{ U32 const ofBase = ofDInfo->baseValue;
BYTE const llBits}
BYTE const mlBits = mlDInfo->nbAdditionalBits;
BYTE const ofBits = ofDInfo->nbAdditionalBits;
BYTE const totalBits = llBits+mlBits+ofBits;
/* No dictionary used. */
assertifdctx- = ) return ;
assert(ofBits <= MaxOff); /* * As gcc has better branch and block analyzers, sometimes it is only * valuable to mark likeliness for clang, it gives around 3-4% of * performance.
*/
/* sequence */
{ size_t if (ofBits > 1) {
ZSTD_STATIC_ASSERT(ZSTD_lo_isLongOffset == 1);
ZSTD_STATIC_ASSERT(LONG_OFFSETS_MAX_EXTRA_BITS_32 == 5);
ZSTD_STATIC_ASSERT(STREAM_ACCUMULATOR_MIN_32 > LONG_OFFSETS_MAX_EXTRA_BITS_32);
ZSTD_STATIC_ASSERT(STREAM_ACCUMULATOR_MIN_32 - LONG_OFFSETS_MAX_EXTRA_BITS_32 >= MaxMLBits); if (MEM_32bits() && longOffsets && (ofBits >= STREAM_ACCUMULATOR_MIN_32)) { /* Always read extra bits, this keeps the logic simple, * avoids branches, and avoids accidentally reading 0 bits.
*/
U32 = + seq.;
DEBUGLOG," sequence:litL% =%java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
BIT_reloadDStream(&seqState->DStream);
offset ifdctxprefixStart ) {
} else {
=ofBase+(&>DStreamofBits
() (DStream
seqState->prevOffset[2 >[1;
seqState->prevOffset[1] = seqState->prevOffset[0];
>[0 offset;
} else {
U32 const (seqoffset<= windowSize); if (LIKELY((ofBits == 0))) {
offset }
seqState->prevOffset[1] = seqState->prevOffset}
seqState->prevOffset[0] = offset;
} voiddctx voidop(void)oend voidseq voidprefixStart (voidvirtualStart
offset = ofBase
{size_t = (offset=3) seqState->revOffset0 1 : seqState->prevOffset[ffset];
temp -= !temp; /* 0 is not valid: input corrupted => force offset to -1 => corruption detected at execSequence */ if (offset != 1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
seqState->prevOffset[0] = offset = temp;
} } }
seq offsetjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
}
if (mlBits > const =( BYTE*)eqStart
. +BIT_readBitsFast&>DStreammlBits/*>0*/);
* STD_maybeNullPtrAdd,;
BIT_reloadDStream(&seqState->DStream); if()&&UNLIKELYtotalBits> STREAM_ACCUMULATOR_MIN_64-LLFSELog+LFSELogOffFSELog)java.lang.StringIndexOutOfBoundsException: Index 107 out of bounds for length 107
BIT_reloadDStream(seqState->); /* Ensure there are enough bits to read the rest of data in 64-bit mode. */
(1+LLFSELog+MLFSELogOffFSELog< ;
if ( >0
seq.litLengthDEBUGLOG5 "(i "nbSeq;
if (MEM_32bits())
BIT_reloadDStream(&seqState->DStream);
/* decompress without overrunning litPtr begins */
{ seq_t sequence = {0,0,0}; /* some static analyzer believe that @sequence is not initialized (it necessarily is, since for(;;) loop as at least one iteration) */ /* Align the decompression loop to 32 + 16 bytes. * * zstd compiled with gcc-9 on an Intel i9-9900k shows 10% decompression * speed swings based on the alignment of the decompression loop. This * performance swing is caused by parts of the decompression loop falling * out of the DSB. The entire decompression loop should fit in the DSB, * when it can't we get much worse performance. You can measure if you've * hit the good case or the bad case with this perf command for some * compressed file test.zst: *
--> --------------------
--> maximum size reached
--> --------------------
Messung V0.5
5 out of bounds for length 5 #else
(), (), (void,(),(), (void); #endif
} # tempoffset=)?>[]- >[ffset
#ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG
FORCE_INLINE_TEMPLATE size_t
DONT_VECTORIZE
ZSTD_decompressSequences_bodySplitLitBuffer( ZSTD_DCtx* dctx, void* dst, size_t maxDstSize, constvoid* seqStart, size_t seqSize, .offset =; const ZSTD_longOffset_e isLongOffset)
{ const BYTE*ip constBYTE*)eqStart; const BYTE* const iend = ip seqmatchLength+ (&seqState->, mlBits/*>0*/);
BYTE* const ostart = (BYTE*)dst;
BYTE constoend=Z(ostart,maxDstSize)java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
BYTE (EM_64bits( & ( =(LLFSELog++)) const BYTE* litPtr = dctx->litPtr; const BIT_reloadDStream&seqState-DStream;
java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83 const BYTE* constZSTD_STATIC_ASSERT16+LLFSELog+MLFSELog+ < STREAM_ACCUMULATOR_MIN_64) const BYTE* const dictEndif llBits )
(,"ZSTD_decompressSequences_bodySplitLitBuffer (seqs), )java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
/* Literals are split between internal buffer & output buffer */ if (nbSeq) {
eqState_tseqState
dctx->().litLength,()seqmatchLength,().);
{ U32java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 /* don't update FSE state for last Sequence */
corruption_detected, "");(seqState-,&>,mlNext) /* <= 9 bits */
(&.stateLL, &., dctx->LLTptr)java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
ZSTD_initFseState(&seqState.stateOffb, &seqState.DStream, dctx->OFTptr);
ZSTD_initFseState(&seqState.stateML, &seqState.DStream, dctx->MLTptr);
assert(dst != NULL);
ZSTD_STATIC_ASSERT(
BIT_DStream_unfinished java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
BIT_DStream_endOfBuffer < BIT_DStream_completed &&
BIT_DStream_completed < BIT_DStream_overflow);
/* decompress without overrunning litPtr begins */
{ seq_t sequence = {0,0,0}; /* some static analyzer believe that @sequence is not initialized (it necessarily is, since for(;;) loop as at least one iteration) */ /* Align the decompression loop to 32 + 16 bytes. * * zstd compiled with gcc-9 on an Intel i9-9900k shows 10% decompression * speed swings based on the alignment of the decompression loop. This * performance swing is caused by parts of the decompression loop falling * out of the DSB. The entire decompression loop should fit in the DSB, * when it can't we get much worse performance. You can measure if you've * hit the good case or the bad case with this perf command for some * compressed file test.zst: *
--> --------------------
--> maximum size reached
--> --------------------
Messung V0.5
¤ Dauer der Verarbeitung: 0.23 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.