Commit Graph

74 Commits

Author SHA1 Message Date
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
zefanxu2
2bb6fc2a94 fix memory leak 2017-02-13 21:12:59 -06:00
Sean Purcell
4e709712e1 Decompressed size functions now handle multiframes and distinguish cases
- Add ZSTD_findDecompressedSize
    - Traverses multiple frames to find total output size
- Add ZSTD_getFrameContentSize
    - Gets the decompressed size of a single frame by reading header
- Deprecate ZSTD_getDecompressedSize
2017-02-08 14:50:10 -08:00
Yann Collet
6e754fe76a fixed lib soname.
example : simple_compression : size overflow check
2016-12-08 18:26:56 -08:00
Yann Collet
16a5752588 streaming example uses stable API 2016-12-08 17:28:26 -08:00
Yann Collet
22de81e87e updated man page 2016-10-28 13:58:31 -07:00
Yann Collet
bfae317ae3 minor const added 2016-10-26 18:44:59 -07:00
Yann Collet
cf08958d9b print one global summary (instead of one per file) 2016-10-26 18:37:29 -07:00
Yann Collet
82613d72e4 added example multiple_streaming_compression 2016-10-26 18:10:43 -07:00
Nick Terrell
3e82f2b61a Remove references to GPLv2 license
License headers added to Makefiles were taken from `zstd/Makefile`.
2016-10-11 15:28:40 -07:00
Yann Collet
47f3697f32 added error check 2016-09-20 11:59:12 +02:00
Yann Collet
86bdcd83c1 added error checking 2016-09-20 11:54:29 +02:00