mirror of
https://github.com/facebook/zstd.git
synced 2024-12-04 19:45:15 +02:00
Compare commits
10 Commits
f9ac79c035
...
ce448e433c
Author | SHA1 | Date | |
---|---|---|---|
|
ce448e433c | ||
|
82d470564d | ||
|
2b36d4bc1c | ||
|
7f11e6d2b6 | ||
|
fcf88ae39b | ||
|
1958fff050 | ||
|
b683c0dbe2 | ||
|
10beb7cb53 | ||
|
194062a4e7 | ||
|
19ccc50338 |
@ -39,7 +39,7 @@ file(GLOB DecompressSources ${LIBRARY_DIR}/decompress/*.c)
|
||||
if (MSVC)
|
||||
add_compile_options(-DZSTD_DISABLE_ASM)
|
||||
else ()
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|AMD64.*|x86_64.*|X86_64.*")
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|AMD64.*|x86_64.*|X86_64.*" AND NOT CMAKE_SYSTEM_NAME STREQUAL "SunOS")
|
||||
set(DecompressSources ${DecompressSources} ${LIBRARY_DIR}/decompress/huf_decompress_amd64.S)
|
||||
else()
|
||||
add_compile_options(-DZSTD_DISABLE_ASM)
|
||||
|
@ -252,6 +252,8 @@ size_t ZSTD_seekable_free(ZSTD_seekable* zs)
|
||||
|
||||
ZSTD_seekTable* ZSTD_seekTable_create_fromSeekable(const ZSTD_seekable* zs)
|
||||
{
|
||||
assert(zs != NULL);
|
||||
if (zs->seekTable.entries == NULL) return NULL;
|
||||
ZSTD_seekTable* const st = (ZSTD_seekTable*)malloc(sizeof(ZSTD_seekTable));
|
||||
if (st==NULL) return NULL;
|
||||
|
||||
|
@ -1120,7 +1120,7 @@ For the purpose of counting total allocated probability points, it counts as one
|
||||
|
||||
Symbols probabilities are read one by one, in order.
|
||||
After each probability is decoded, the total nb of probability points is updated.
|
||||
This is used to dermine how many bits must be read to decode the probability of next symbol.
|
||||
This is used to determine how many bits must be read to decode the probability of next symbol.
|
||||
|
||||
When a symbol has a __probability__ of `zero` (decoded from reading a Value `1`),
|
||||
it is followed by a 2-bits repeat flag.
|
||||
|
@ -75,7 +75,7 @@ unsigned HIST_count_simple(unsigned* count, unsigned* maxSymbolValuePtr,
|
||||
const void* src, size_t srcSize);
|
||||
|
||||
/*! HIST_add() :
|
||||
* Lowest level: just add nb of occurences of characters from @src into @count.
|
||||
* Lowest level: just add nb of occurrences of characters from @src into @count.
|
||||
* @count is not reset. @count array is presumed large enough (i.e. 1 KB).
|
||||
@ This function does not need any additional stack memory.
|
||||
*/
|
||||
|
@ -224,7 +224,7 @@ ZSTDLIB_API size_t ZSTD_findFrameCompressedSize(const void* src, size_t srcSize)
|
||||
* it's recommended to provide @dstCapacity >= ZSTD_compressBound(srcSize)
|
||||
* as it eliminates one potential failure scenario,
|
||||
* aka not enough room in dst buffer to write the compressed frame.
|
||||
* Note : ZSTD_compressBound() itself can fail, if @srcSize > ZSTD_MAX_INPUT_SIZE .
|
||||
* Note : ZSTD_compressBound() itself can fail, if @srcSize >= ZSTD_MAX_INPUT_SIZE .
|
||||
* In which case, ZSTD_compressBound() will return an error code
|
||||
* which can be tested using ZSTD_isError().
|
||||
*
|
||||
|
@ -696,7 +696,7 @@ static void printDefaultCParams(const char* filename, const char* dictFileName,
|
||||
unsigned long long fileSize = UTIL_getFileSize(filename);
|
||||
const size_t dictSize = dictFileName != NULL ? (size_t)UTIL_getFileSize(dictFileName) : 0;
|
||||
const ZSTD_compressionParameters cParams = ZSTD_getCParams(cLevel, fileSize, dictSize);
|
||||
if (fileSize != UTIL_FILESIZE_UNKNOWN) DISPLAY("%s (%u bytes)\n", filename, (unsigned)fileSize);
|
||||
if (fileSize != UTIL_FILESIZE_UNKNOWN) DISPLAY("%s (%llu bytes)\n", filename, fileSize);
|
||||
else DISPLAY("%s (src size unknown)\n", filename);
|
||||
DISPLAY(" - windowLog : %u\n", cParams.windowLog);
|
||||
DISPLAY(" - chainLog : %u\n", cParams.chainLog);
|
||||
|
Loading…
Reference in New Issue
Block a user