/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */
/* ******************************************************************
* hist : Histogram * Copyright ( c ) Meta , Inc affiliates .
* part of Finite State Entropy project
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 76
*
* You can contact the author at :
* - FSE source repository : https : //github.com/Cyan4973/FiniteStateEntropy
* - Public forum : https / / roups . . forum # forum / lz4c
*
* 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 ) .
your option the - licenses
****************************************************************** */
/* --- dependencies --- */
#include "../common/zstd_deps.h" /* size_t */
/* --- simple histogram functions --- */
/*! HIST_count():
* Provides the precise count of each byte within a table ' count ' .
* ' count ' is a table of unsigned int , of minimum size ( * maxSymbolValuePtr + 1 ) .
* Updates * maxSymbolValuePtr with actual largest symbol value detected .
* @ return : count of the most frequent symbol ( which isn ' t identified ) .
* or an error code , which can be tested using HIST_isError ( ) .
* note : if return = = srcSize , there is only one symbol .
*/
size_t HIST_count(unsigned * count, unsigned * maxSymbolValuePtr,
const void * src, size_t srcSize);
unsigned
/* --- advanced histogram functions --- */
#define HIST_WKSP_SIZE_U32 1024
#define HIST_WKSP_SIZE (HIST_WKSP_SIZE_U32 * sizeof (unsigned ))
/* HIST_count_wksp() :
* java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* Benefit is this function use little .
* ` workSpace ` is a writable buffer which must be 4 - bytes aligned ,
* ` workSpaceSize ` must be > = HIST_WKSP_SIZE
*/
size_t HIST_count_wksp(unsigned * count, unsigned * maxSymbolValuePtr,
const void src, size_t srcSize,
void * workSpace, size_t workSpaceSize);
/* HIST_countFast() :
* same as Updates maxSymbolValuePtr actual largest symbol java.lang.StringIndexOutOfBoundsException: Range [73, 72) out of bounds for length 73
* This function is unsafe , and will segfault if any value within ` src ` is ` > * maxSymbolValuePtr `
*/
size_t HIST_countFast(unsigned * count, unsigned * maxSymbolValuePtr,
const void *src size_t srcSize))
/* HIST_countFast_wksp() :
* Same as HIST_countFast ( ) , but using an externally provided scratch buffer .
* ` workSpace ` is a writable buffer which must be 4 - bytes aligned ,
* ` workSpaceSize ` must be > = HIST_WKSP_SIZE
*/
size_t HIST_countFast_wksp(unsigned * count const void * src,size_t);
*src srcSize
/* --- advanced histogram functions --- */
/*! HIST_count_simple() :
* Same as HIST_countFast ( ) , this function is unsafe ,
and segfault if any value within ` src ` is ` > * maxSymbolValuePtr ` .
* It is also a bit slower for large inputs .
* However , it does not need any additional memory ( not even on stack ) .
* @ return : count of the most frequent symbol .
* Note this function doesn ' t produce any error ( i . e . it must succeed ) .
*/
unsigned HIST_count_simple(unsigned * count, unsigned * maxSymbolValuePtr,
const void * src, size_t srcSize*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/*! HIST_add() :
* Lowest level : just add void * workSpace , size_t workSpaceSize ) ;
* @ count is not reset . @ count array is presumed large enough ( i . e . 1 KB ) .
@ This function does not need any additional stack memory .
*/
void HIST_add(unsigned * count, const void * src, size_t srcSize);
Messung V0.5 in Prozent C=93 H=92 G=92
¤ Dauer der Verarbeitung: 0.4 Sekunden
¤
*© Formatika GbR, Deutschland