Commit Graph

85 Commits (master)

Author SHA1 Message Date
Yann Collet 3f7a1b1328 added a few documentation words about dictionary training
partially answering questions such as #3233
which looks for guidance within `exmaples/`.
2022-08-05 17:09:22 +02:00
Frank Wessels 7ee35bad6b
Fix mini typo 2021-12-28 09:04:28 -08:00
Adrian Castro e0f9dc0dde
typo: Small spelling mistake in example
Just a couple of characters:
`main` -> `may`
2021-12-11 12:02:23 +01:00
Nick Terrell 91f5891dd0 [CircleCI] Fix short-tests-0
short-tests-0 were silently failing. I think because of the && make clean construction. Switch to ; instead.

Also fix all the test failures that were exposed.

`make all` is failing on CircleCI because it is missing Docker. Move that test
to GitHub actions, and switch the pedantic CircleCI test to `make allmost`.
2021-12-01 17:43:46 -08:00
Martin Liska 926d47004d Enhance streaming_compression examples.
Add level argument to the first test and be more verbose about
used compression level and number of threads.
2021-10-12 08:59:34 +02:00
Nick Terrell a494308ae9 [copyright][license] Switch to yearless copyright and some cleanup in the linux-kernel files
* Switch to yearless copyright per FB policy
* Fix up SPDX-License-Identifier lines in `contrib/linux-kernel` sources
* Add zstd copyright/license header to the `contrib/linux-kernel` sources
* Update the `tests/test-license.py` to check for yearless copyright
* Improvements to `tests/test-license.py`
* Check `contrib/linux-kernel` in `tests/test-license.py`
2021-03-30 10:30:43 -07:00
Nick Terrell 66e811d782 [license] Update year to 2021 2021-01-04 17:53:52 -05:00
Yann Collet ecffa77e12 streamlined example recipe
better use of default rules
2020-12-15 02:07:08 -08:00
Martin Liska b684900a4a Allow external creation of POOLs that can be shared. 2020-10-07 12:44:33 +02:00
Martin Liska 461348c09a
Use threads in streaming_compression.c example.
Fixes #1584.
2020-07-09 09:20:06 +02:00
Nick Terrell ac58c8d720 Fix copyright and license lines
* All copyright lines now have -2020 instead of -present
* All copyright lines include "Facebook, Inc"
* All licenses are now standardized

The copyright in `threading.{h,c}` is not changed because it comes from
zstdmt.

The copyright and license of `divsufsort.{h,c}` is not changed.
2020-03-26 17:02:06 -07:00
Jan Kasiak a8219903cf Fix streaming compression/decompression examples
* Handle compression of empty file
* Error in decompression in case of trailing data
2019-09-01 17:22:42 -04:00
sjnam bee9e5f38c fix test fail 2019-04-28 05:05:45 +09:00
Josh Soref a880ca239b Spelling (#1582)
* spelling: accidentally

* spelling: across

* spelling: additionally

* spelling: addresses

* spelling: appropriate

* spelling: assumed

* spelling: available

* spelling: builder

* spelling: capacity

* spelling: compiler

* spelling: compressibility

* spelling: compressor

* spelling: compression

* spelling: contract

* spelling: convenience

* spelling: decompress

* spelling: description

* spelling: deflate

* spelling: deterministically

* spelling: dictionary

* spelling: display

* spelling: eliminate

* spelling: preemptively

* spelling: exclude

* spelling: failure

* spelling: independence

* spelling: independent

* spelling: intentionally

* spelling: matching

* spelling: maximum

* spelling: meaning

* spelling: mishandled

* spelling: memory

* spelling: occasionally

* spelling: occurrence

* spelling: official

* spelling: offsets

* spelling: original

* spelling: output

* spelling: overflow

* spelling: overridden

* spelling: parameter

* spelling: performance

* spelling: probability

* spelling: receives

* spelling: redundant

* spelling: recompression

* spelling: resources

* spelling: sanity

* spelling: segment

* spelling: series

* spelling: specified

* spelling: specify

* spelling: subtracted

* spelling: successful

* spelling: return

* spelling: translation

* spelling: update

* spelling: unrelated

* spelling: useless

* spelling: variables

* spelling: variety

* spelling: verbatim

* spelling: verification

* spelling: visited

* spelling: warming

* spelling: workers

* spelling: with
2019-04-12 11:18:11 -07:00
Nick Terrell 1d0c1707d1 [examples] Clean up and comment the examples 2019-04-05 21:02:07 -07:00
Nick Terrell 56261001ea
Merge pull request #1567 from terrelln/examples2
[examples] Update streaming_decompression.c
2019-04-03 11:27:49 -07:00
Yann Collet 816a3f47c7
Merge pull request #1568 from terrelln/examples3
Update streaming_memory_usage.c and fix ZSTD_estimateCStreamSize_usingCCtxParams()
2019-04-03 09:07:13 -07:00
Nick Terrell cdc8ae2e9b [examples] Update streaming_memory_usage.c
Update to use the new streaming API. Making progress on Issue #1548.

Tested that the checks don't fail.
Tested with window log 9-32. The lowest and highest fail as expected.
2019-04-02 19:20:57 -07:00
Nick Terrell de58910b5a [examples] Update streaming_decompression.c
Update to use the new streaming API. Making progress on Issue #1548.

Tested that it can decompress files produced by `streaming_compression`.
Tested that it can decompress two frames concatenated together.
Tested that it fails on corrupted data.
2019-04-02 18:52:59 -07:00
Nick Terrell 04325cbc2f Fix indentation 2019-04-01 17:33:49 -07:00
Nick Terrell fb13d757af [examples] Update multiple_streaming_compression.c
Update to use the new streaming API. Making progress on Issue #1548.

Tested that multiple files could be compressed, and that the output
is the same as calling `streaming_compression` multiple times with
the same compression level, and that it can be decompressed.
2019-04-01 16:41:06 -07:00
Nick Terrell f5cbee988b [examples] Update streaming_compression to the new API 2019-03-23 15:59:26 -07:00
Yann Collet a1394399b4 fixed minor conversion warnings in examples/ 2019-01-19 23:38:20 -08:00
Yi Jin bc4dc606de break loadFile_orDie() into 2: loadFile_orDie() loads file into a pre-allocated memory buffer, mallocAndLoadFile_orDie() allocates memory first, then calls loadFile_orDie() 2018-12-17 16:54:55 -08:00
Yi Jin 452689678b bug fix in loadFile_orDie(): exit with error code if filesize is bigger than provided buffer 2018-12-16 22:44:27 -08:00
Yi Jin a951ee9fe1 comment out printf() to make output terse 2018-12-16 21:27:52 -08:00
Yi Jin 595401e4c7 edit README.md and remove simple_compressionCCtx.c 2018-12-16 21:09:21 -08:00
Yi Jin ea4859ec71 add multiple_simple_compression.c 2018-12-16 20:45:43 -08:00
Yi Jin cce0842c60 Factor out allocMemory_orDIe(...) in simple_compressionCCtx.c, and amend Makefile to account for dependency on utils.h 2018-12-16 15:36:28 -08:00
Yi Jin 0d14153cfb formatting 2018-12-14 22:10:31 -08:00
Yi Jin 04d06ad885 refactor utils.h and implement simple_compressionCCtx.c 2018-12-14 18:12:05 -08:00
Yi Jin 193fbd30f2 WIP 2018-12-13 22:51:35 -08:00
Yi Jin 7f975c0c28 create simple_compressionCCtx.c out of simple_compression.c, to be worked on 2018-12-13 15:42:55 -08:00
Hung Dang 0f52b0caad Refactor examples to avoid code duplication. 2018-12-06 22:42:19 -05:00
Yann Collet 1515f0bb0d fixed more issues detected by recent version of scan-build
test run on Linux
2018-08-16 15:20:25 -07:00
Björn Ketelaars b7e2c8e723 examples/Makefile assumes GNU make.
This fixes a building issue on systems that default to a different
flavour of make (as is the case with OpenBSD).
2018-03-31 10:25:12 +02:00
Yann Collet d6e841d609 fixed streaming_memory_usage example
also:
ensure zstd.h is read from ../lib (instead of /usr/include)
2018-02-07 23:42:09 -08:00
Yann Collet 96f0cde31a minor function rename
ZSTD_estimateCStreamSize_advanced_usingCParams -> ZSTD_estimateCStreamSize_usingCParams
_usingX is clear.
_advanced feels redundant
2017-09-24 16:47:02 -07:00
Yann Collet 9c1908a3cd added streaming_memory_usage example 2017-09-18 15:49:59 -07:00
Yann Collet 3128e03be6 updated license header
to clarify dual-license meaning as "or"
2017-09-08 00:09:23 -07:00
Yann Collet e9dc204f42 fixed a bunch of headers after license change (#825) 2017-08-31 11:24:54 -07:00
Yann Collet 394bdd7db9 changed license for examples
intentionnally this time
2017-08-29 09:24:11 -07:00
Yann Collet 232d62b637 fixed a few headers that were too hastily copy/pasted during last license change 2017-08-21 11:24:32 -07:00
Yann Collet 32fb407c9d updated a bunch of headers
for the new license
2017-08-18 16:52:05 -07:00
Yann Collet 83d0c764dc added several compilation flags 2017-05-15 17:15:46 -07:00
niXman 65e2cda7aa unchecked argv[idx] access 2017-04-26 13:04:04 +03:00
Yann Collet 1f3d54ddb4 fixed malloc(0) potential issue
Added test cases to cover #556 patch
2017-02-22 11:08:00 -08:00
Soojin Nam 971c161318 test for fail to decompress 2017-02-22 16:04:48 +09:00
Soojin Nam 6e18d33122 original size unknown 2017-02-21 09:51:40 +09:00
Yann Collet 4596037042 updated fse version
feature minor refactoring (removing FSE_abs())
also : fix a few minor issues recently introduced in examples
2017-02-15 12:00:03 -08:00