Nick Terrell
b5fd348a85
Merge pull request #2523 from terrelln/huf-stack-reduction
...
Add HUF_writeCTable_wksp() function
2021-03-05 12:35:09 -08:00
Nick Terrell
5df2a21f1e
Add HUF_writeCTable_wksp() function
...
This saves ~700 bytes of stack space in HUF_writeCTable.
2021-03-05 10:29:18 -08:00
Yann Collet
029f974ddc
strengthen compilation flags
2021-03-02 15:43:52 -08:00
Nick Terrell
f520f6dfbe
[trace] Minor fixes found during integration
...
* Mark `ZSTD_CCtx_getParameter()` as const
* Add `extern "C"` guards to `zstd_trace.h`
2021-02-11 16:20:04 -08:00
Nick Terrell
e59c9459a5
[trace] Keep track of a uint64_t tracing context
...
The most common information that you want to track between begin() and
end() is the timestamp of the begin function, so you can measure the
duration of the (de)compression call. Allow the tracing library to put
this information inside the `ZSTD_TraceCtx`, so it doesn't need to keep
a global map in this case. If a single uint64_t is not enough, the
tracing library can return a unique identifier (like the context
pointer) instead, and use it as a key in a map.
This keeps the simple case simple.
2021-02-09 11:37:05 -08:00
Nick Terrell
54a4998a80
Add basic tracing functionality
2021-02-05 16:28:52 -08:00
Nick Terrell
66e811d782
[license] Update year to 2021
2021-01-04 17:53:52 -05:00
Nick Terrell
ae85676d44
Fix alignment of scratchBuffer in HUF_compressWeights()
...
The scratch buffer must be 4-byte aligned. This causes test failures in
32-bit systems, where the stack isn't aligned.
Fixes Issue #2428 .
2020-12-17 14:30:27 -08:00
Yann Collet
6132df8dd3
fix gcc-10 strict aliasing warnings
...
by exposing HUF_CElt declaration.
2020-12-04 16:43:19 -08:00
Yann Collet
68c14bdff2
minor speed improvement to HUF_readCTable()
...
faster by ~+1-2%
2020-12-04 16:33:39 -08:00
Nick Terrell
7205e609a9
Merge pull request #2354 from terrelln/stable-buffer
...
Add ZSTD_c_stable{In,Out}Buffer and optimize when set
2020-10-30 15:06:56 -07:00
Nick Terrell
c74be3f6de
[lib] Validate buffers when ZSTD_c_stable{In,Out}Buffer is set
...
Adds the validation of the input/output buffers only. They are still
unused.
2020-10-30 10:55:34 -07:00
Nick Terrell
e3e0775cc8
[API] Add ZSTD_c_stable{In,Out}Buffer parameters
...
This commit adds the parameters and sets the value in the CCtxParams
but it does not do anything with the value.
2020-10-30 10:54:39 -07:00
senhuang42
3ed5d053d8
Clarify comments in zstd.h some more
2020-10-28 09:53:09 -04:00
senhuang42
9171f920cd
Improve documentation of seqStore_t
2020-10-27 10:50:22 -04:00
Nick Terrell
8c46c1d851
Merge pull request #2356 from bsdimp/neon
...
aarch64: use __ARM_NEON instead of __aarch64__ to control use of neon
2020-10-13 15:42:46 -07:00
Warner Losh
43c0054405
aarch64: use __ARM_NEON instead of __aarch64__ to control use of neon
...
There are compilation environments in aarch64 where NEON isn't
available. While these environments could define ZSTD_NO_INTRINSICS,
it's more fail-safe to use the more specific symbol to know if NEON
extensions are available.
__ARM_NEON is the proper symbol, defined in ARM C Language Extensions
Release 2.1 (https://developer.arm.com/documentation/ihi0053/d/ ). Some
sources suggest __ARM_NEON__, but that's the obsolete spelling from
prior versions of the standard.
Signed-off-by: Warner Losh <imp@bsdimp.com>
2020-10-13 12:12:46 -06:00
Like Ma
cc907770bd
Fix building on AIX 5.1
2020-10-09 18:34:00 +08:00
Yann Collet
12541931fa
Merge pull request #2328 from marxin/zstd-pool-api
...
Allow external creation of POOLs that can be shared.
2020-10-09 01:00:50 -07:00
Martin Liska
b684900a4a
Allow external creation of POOLs that can be shared.
2020-10-07 12:44:33 +02:00
Nick Terrell
f1cbeec039
[superblock] Reduce stack usage by correctly sizing header buffers
2020-09-24 19:42:04 -07:00
Nick Terrell
caecd8c211
Allow user to override ASAN/MSAN detection
...
Rename ADDRESS_SANITIZER -> ZSTD_ADDRESS_SANITIZER and same for
MEMORY_SANITIZER. Also set it to 0/1 instead of checking for defined.
This allows the user to override ASAN/MSAN detection for platforms that
don't support it.
2020-09-24 19:42:04 -07:00
Nick Terrell
9ae0483858
Reorganize zstd_deps.h and mem.h + replace mem.h for the kernel
2020-09-24 19:41:59 -07:00
Nick Terrell
260fc75028
Move __has_builtin() fallback define to compiler.h
2020-09-24 15:51:08 -07:00
Nick Terrell
4d63ee57f5
Move ASAN/MSAN support declarations to compiler.h
2020-09-24 15:51:08 -07:00
Nick Terrell
b09ec5c2b9
Remove MEM_STATIC_ASSERT and use DEBUG_STATIC_ASSERT instead
2020-09-24 15:51:04 -07:00
Nick Terrell
dec7fb03ec
[lib] Silence -Wunused-const-variable warnings
2020-09-23 12:59:57 -07:00
Nick Terrell
aab4bf7b0d
[linux-kernel] Add test that checks the ifdef hardwiring
2020-09-09 14:36:19 -07:00
Nick Terrell
79ded1b4a9
[lib] Add ZSTD_NO_UNUSED_FUNCTIONS macro to hide unused functions
...
The unused function definitions are hidden behind a
`#ifndef ZSTD_NO_UNUSED_FUNCTIONS` check.
Initially hiding all functions which are unused and take up more than
2KB of stack space, because these will show up as warnings in the
Linux Kernel build system.
2020-09-09 14:35:39 -07:00
Nick Terrell
ac3a136b0a
[lib] Replace 64-bit divisions with ZSTD_div64()
2020-09-09 14:35:39 -07:00
Nick Terrell
a90779397a
[lib] Reduce zstd stack usage by 1KB
2020-09-09 14:35:39 -07:00
Nick Terrell
e975de289c
Add ZSTD_NO_INTRINSICS macro to avoid explicit intrinsics
2020-09-09 14:35:39 -07:00
Nick Terrell
c465f24457
ZSTD_ prefix mem{cpy,move,set},malloc,calloc,free
2020-08-26 12:26:03 -07:00
Nick Terrell
a686d306d2
Rename ZSTD_{malloc,calloc,free} to ZSTD_custom{Malloc,Calloc,Free}
2020-08-26 12:25:08 -07:00
Nick Terrell
80f577baa2
Move standard includes to zstd_deps.h
2020-08-26 12:25:08 -07:00
Nick Terrell
4193638996
[bug] Fix FSE_readNCount()
...
* Fix bug introduced in PR #2271
* Fix long-standing bug that is impossible to trigger inside of zstd
* Add a fuzzer that makes sure the normalized count always round trips
correctly
2020-08-25 15:42:41 -07:00
Nick Terrell
614e446000
Merge pull request #2271 from terrelln/small-blocks
...
Small block optimizations
2020-08-24 18:54:33 -07:00
Nick Terrell
6d2f750b37
Document the BMI2 default() functions
2020-08-24 14:44:33 -07:00
Nick Terrell
cebe0b5c0b
Improve FSE_normalizeCount() docs
2020-08-24 13:58:34 -07:00
Nick Terrell
8def0e5fd3
Fix up code after reading through
2020-08-24 12:24:45 -07:00
Nick Terrell
8f8bd2d1ac
[regression] Update results.csv
2020-08-20 12:41:35 -07:00
Nick Terrell
575731b6db
Use ncount=1 when < 4096 symbols
2020-08-18 16:47:53 -07:00
Nick Terrell
612e947c5e
wire up bmi2 support
2020-08-17 16:35:28 -07:00
Nick Terrell
ba1fd17a9f
speed up literal header decoding
2020-08-17 12:17:53 -07:00
Nick Terrell
6004c1117f
speed up small blocks
2020-08-16 23:03:38 -07:00
Nick Terrell
e3bda594ae
Prefer __builtin_prefetch over inline asm
...
Reorder the ifdefs for the PREFETCH macros so that the compiler builtin is
favored over the inline assembly for aarch64.
2020-08-10 22:17:18 -07:00
Yann Collet
38e38546a4
Merge pull request #2258 from Niadb/dev
...
Added STATIC_BMI2 for compile time detection of BMI2 on MSVC, when enabled various intrinsics are used
2020-08-04 09:43:59 -07:00
helloguo
acb3dd9a68
Use ZSTD_copy16 instead of memcpy
2020-07-28 11:58:46 -07:00
Niadb
a8ebc14035
Update bitstream.h
...
Profiler showed some of these not being inlined on MSVC
2020-07-28 11:17:04 -06:00
Niadb
493fd40dca
Add files via upload
2020-07-28 02:52:15 -06:00