~mmach/netext73/lz4

« back to all changes in this revision

Viewing changes to examples/compress_functions.c

  • Committer: mmach
  • Date: 2022-11-09 18:52:10 UTC
  • Revision ID: netbit73@gmail.com-20221109185210-w358idlhh0phq688
1.9.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 *
36
36
 *               LZ4_decompress_safe
37
37
 *                 This is the recommended function for decompressing data.  It is considered safe because the caller specifies
38
 
 *                 both the size of the compresssed buffer to read as well as the maximum size of the output (decompressed) buffer
 
38
 *                 both the size of the compressed buffer to read as well as the maximum size of the output (decompressed) buffer
39
39
 *                 instead of just the latter.
40
40
 *               LZ4_decompress_fast
41
41
 *                 Again, despite its name it's not a "fast" version of decompression.  It simply frees the caller of sending the
48
48
 *               Special Note About Decompression:
49
49
 *               Using the LZ4_decompress_safe() function protects against malicious (user) input.  If you are using data from a
50
50
 *               trusted source, or if your program is the producer (P) as well as its consumer (C) in a PC or MPMC setup, you can
51
 
 *               safely use the LZ4_decompress_fast function
 
51
 *               safely use the LZ4_decompress_fast function.
52
52
 */
53
53
 
54
54
/* Since lz4 compiles with c99 and not gnu/std99 we need to enable POSIX linking for time.h structs and functions. */