aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Collet <Cyan4973@users.noreply.github.com>2022-08-11 15:55:41 -0700
committerGitHub <noreply@github.com>2022-08-11 15:55:41 -0700
commit86e1ad67528af715ff44ba9954ab250a9898b141 (patch)
tree065915b761632862d3c0bdaed34d424a01c06a20
parente691e827280453e67fdf57421bb58d6e1faf734d (diff)
parent23af1d776dda4ecc3596930c59dc29a9a7f8c28a (diff)
downloadlz4-86e1ad67528af715ff44ba9954ab250a9898b141.tar.gz
Merge pull request #1132 from lz4/prepv194
Update documentation in preparation for release v1.9.4
-rw-r--r--NEWS19
-rw-r--r--doc/lz4_manual.html47
-rw-r--r--doc/lz4frame_manual.html126
-rw-r--r--lib/README.md26
-rw-r--r--programs/lz4.116
-rw-r--r--programs/lz4.1.md11
6 files changed, 172 insertions, 73 deletions
diff --git a/NEWS b/NEWS
index 401931e4..c2cef0ea 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,22 @@
+v1.9.4
+perf : faster decoding speed (~+20%) on aarch64 platforms
+api : new function `LZ4_decompress_safe_partial_usingDict()` by @yawqi
+api : lz4frame: ability to provide custom allocators at state creation
+api : can skip checksum validation for improved decoding speed
+api : new experimental unit `lz4file` for file i/o API, by @anjiahao1
+api : new experimental function `LZ4F_uncompressedUpdate()`, by @alexmohr
+cli : `--list` works on `stdin` input, by @Low-power
+cli : `--no-crc` does not produce (compression) nor check (decompression) checksums
+cli : fix: `--test` and `--list` produce an error code when parsing invalid input
+cli : fix: support skippable frames when passed via `stdin`, reported by @davidmankin
+build: fix: Makefile respects CFLAGS directives passed via environment variable
+build: `LZ4_FREESTANDING`, new build macro for freestanding environments, by @t-mat
+build: `make` and `make test` are compatible with `-j` parallel run
+build: AS/400 compatibility, by @jonrumsey
+build: Solaris 10 compatibility, by @pekdon
+build: improved meson script, by @eli-schwartz
+doc : Updated LZ4 block format, provide an "implementation notes" section
+
v1.9.3
perf: highly improved speed in kernel space, by @terrelln
perf: faster speed with Visual Studio, thanks to @wolfpld and @remittor
diff --git a/doc/lz4_manual.html b/doc/lz4_manual.html
index 5461ab92..6fafb214 100644
--- a/doc/lz4_manual.html
+++ b/doc/lz4_manual.html
@@ -48,6 +48,35 @@
The `lz4` CLI can only manage frames.
<BR></pre>
+<pre><b>#if defined(LZ4_FREESTANDING) && (LZ4_FREESTANDING == 1)
+# define LZ4_HEAPMODE 0
+# define LZ4HC_HEAPMODE 0
+# define LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION 1
+# if !defined(LZ4_memcpy)
+# error "LZ4_FREESTANDING requires macro 'LZ4_memcpy'."
+# endif
+# if !defined(LZ4_memset)
+# error "LZ4_FREESTANDING requires macro 'LZ4_memset'."
+# endif
+# if !defined(LZ4_memmove)
+# error "LZ4_FREESTANDING requires macro 'LZ4_memmove'."
+# endif
+#elif ! defined(LZ4_FREESTANDING)
+# define LZ4_FREESTANDING 0
+#endif
+</b><p> When this macro is set to 1, it enables "freestanding mode" that is
+ suitable for typical freestanding environment which doesn't support
+ standard C library.
+
+ - LZ4_FREESTANDING is a compile-time switch.
+ - It requires the following macros to be defined:
+ LZ4_memcpy, LZ4_memmove, LZ4_memset.
+ - It only enables LZ4/HC functions which don't use heap.
+ All LZ4F_* functions are not supported.
+ - See tests/freestanding.c to check its basic setup.
+
+</p></pre><BR>
+
<a name="Chapter2"></a><h2>Version</h2><pre></pre>
<pre><b>int LZ4_versionNumber (void); </b>/**< library version number; useful to check dll version; requires v1.3.0+ */<b>
@@ -267,8 +296,10 @@ int LZ4_compress_fast_extState (void* state, const char* src, char* dst, int src
<a name="Chapter7"></a><h2>Streaming Decompression Functions</h2><pre> Bufferless synchronous API
<BR></pre>
-<pre><b>LZ4_streamDecode_t* LZ4_createStreamDecode(void);
+<pre><b>#if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION)
+LZ4_streamDecode_t* LZ4_createStreamDecode(void);
int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream);
+#endif </b>/* !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) */<b>
</b><p> creation / destruction of streaming decompression tracking context.
A tracking context can be re-used multiple times.
@@ -297,7 +328,10 @@ int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream);
</p></pre><BR>
-<pre><b>int LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* src, char* dst, int srcSize, int dstCapacity);
+<pre><b>int
+LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode,
+ const char* src, char* dst,
+ int srcSize, int dstCapacity);
</b><p> These decoding functions allow decompression of consecutive blocks in "streaming" mode.
A block is an unsplittable entity, it must be presented entirely to a decompression function.
Decompression functions only accepts one block at a time.
@@ -323,7 +357,10 @@ int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream);
then indicate where this data is saved using LZ4_setStreamDecode(), before decompressing next block.
</p></pre><BR>
-<pre><b>int LZ4_decompress_safe_usingDict (const char* src, char* dst, int srcSize, int dstCapcity, const char* dictStart, int dictSize);
+<pre><b>int
+LZ4_decompress_safe_usingDict(const char* src, char* dst,
+ int srcSize, int dstCapacity,
+ const char* dictStart, int dictSize);
</b><p> These decoding functions work the same as
a combination of LZ4_setStreamDecode() followed by LZ4_decompress_*_continue()
They are stand-alone, and don't need an LZ4_streamDecode_t structure.
@@ -363,7 +400,9 @@ int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream);
</p></pre><BR>
-<pre><b>LZ4LIB_STATIC_API void LZ4_attach_dictionary(LZ4_stream_t* workingStream, const LZ4_stream_t* dictionaryStream);
+<pre><b>LZ4LIB_STATIC_API void
+LZ4_attach_dictionary(LZ4_stream_t* workingStream,
+ const LZ4_stream_t* dictionaryStream);
</b><p> This is an experimental API that allows
efficient use of a static dictionary many times.
diff --git a/doc/lz4frame_manual.html b/doc/lz4frame_manual.html
index 196881e4..cfb437e4 100644
--- a/doc/lz4frame_manual.html
+++ b/doc/lz4frame_manual.html
@@ -22,9 +22,9 @@
</ol>
<hr>
<a name="Chapter1"></a><h2>Introduction</h2><pre>
- lz4frame.h implements LZ4 frame specification (doc/lz4_Frame_format.md).
- lz4frame.h provides frame compression functions that take care
- of encoding standard metadata alongside LZ4-compressed blocks.
+ lz4frame.h implements LZ4 frame specification: see doc/lz4_Frame_format.md .
+ LZ4 Frames are compatible with `lz4` CLI,
+ and designed to be interoperable with any system.
<BR></pre>
<a name="Chapter2"></a><h2>Compiler specifics</h2><pre></pre>
@@ -135,17 +135,19 @@
<pre><b>LZ4F_errorCode_t LZ4F_createCompressionContext(LZ4F_cctx** cctxPtr, unsigned version);
LZ4F_errorCode_t LZ4F_freeCompressionContext(LZ4F_cctx* cctx);
-</b><p> The first thing to do is to create a compressionContext object,
- which will keep track of operation state during streaming compression.
- This is achieved using LZ4F_createCompressionContext(), which takes as argument a version.
- The version provided MUST be LZ4F_VERSION. It is intended to track potential version mismatch, notably when using DLL.
- The function will provide a pointer to a fully allocated LZ4F_cctx object.
- If @return != zero, there context creation failed.
- Once all streaming compression jobs are completed,
- the state object can be released using LZ4F_freeCompressionContext().
- Note1 : LZ4F_freeCompressionContext() is always successful. Its return value can be ignored.
- Note2 : LZ4F_freeCompressionContext() works fine with NULL input pointers (do nothing).
-
+</b><p> The first thing to do is to create a compressionContext object,
+ which will keep track of operation state during streaming compression.
+ This is achieved using LZ4F_createCompressionContext(), which takes as argument a version,
+ and a pointer to LZ4F_cctx*, to write the resulting pointer into.
+ @version provided MUST be LZ4F_VERSION. It is intended to track potential version mismatch, notably when using DLL.
+ The function provides a pointer to a fully allocated LZ4F_cctx object.
+ @cctxPtr MUST be != NULL.
+ If @return != zero, context creation failed.
+ A created compression context can be employed multiple times for consecutive streaming operations.
+ Once all streaming compression jobs are completed,
+ the state object can be released using LZ4F_freeCompressionContext().
+ Note1 : LZ4F_freeCompressionContext() is always successful. Its return value can be ignored.
+ Note2 : LZ4F_freeCompressionContext() works fine with NULL input pointers (do nothing).
</p></pre><BR>
<a name="Chapter8"></a><h2>Compression</h2><pre></pre>
@@ -225,16 +227,21 @@ LZ4F_errorCode_t LZ4F_freeCompressionContext(LZ4F_cctx* cctx);
<a name="Chapter9"></a><h2>Decompression functions</h2><pre></pre>
<pre><b>typedef struct {
- unsigned stableDst; </b>/* pledges that last 64KB decompressed data will remain available unmodified. This optimization skips storage operations in tmp buffers. */<b>
- unsigned reserved[3]; </b>/* must be set to zero for forward compatibility */<b>
+ unsigned stableDst; /* pledges that last 64KB decompressed data will remain available unmodified between invocations.
+ * This optimization skips storage operations in tmp buffers. */
+ unsigned skipChecksums; /* disable checksum calculation and verification, even when one is present in frame, to save CPU time.
+ * Setting this option to 1 once disables all checksums for the rest of the frame. */
+ unsigned reserved1; </b>/* must be set to zero for forward compatibility */<b>
+ unsigned reserved0; </b>/* idem */<b>
} LZ4F_decompressOptions_t;
</b></pre><BR>
<pre><b>LZ4F_errorCode_t LZ4F_createDecompressionContext(LZ4F_dctx** dctxPtr, unsigned version);
LZ4F_errorCode_t LZ4F_freeDecompressionContext(LZ4F_dctx* dctx);
</b><p> Create an LZ4F_dctx object, to track all decompression operations.
- The version provided MUST be LZ4F_VERSION.
- The function provides a pointer to an allocated and initialized LZ4F_dctx object.
- The result is an errorCode, which can be tested using LZ4F_isError().
+ @version provided MUST be LZ4F_VERSION.
+ @dctxPtr MUST be valid.
+ The function fills @dctxPtr with the value of a pointer to an allocated and initialized LZ4F_dctx object.
+ The @return is an errorCode, which can be tested using LZ4F_isError().
dctx memory can be released using LZ4F_freeDecompressionContext();
Result of LZ4F_freeDecompressionContext() indicates current state of decompressionContext when being released.
That is, it should be == 0 if decompression has been completed fully and correctly.
@@ -254,11 +261,12 @@ LZ4F_errorCode_t LZ4F_freeDecompressionContext(LZ4F_dctx* dctx);
</p></pre><BR>
-<pre><b>size_t LZ4F_getFrameInfo(LZ4F_dctx* dctx,
- LZ4F_frameInfo_t* frameInfoPtr,
- const void* srcBuffer, size_t* srcSizePtr);
+<pre><b>size_t
+LZ4F_getFrameInfo(LZ4F_dctx* dctx,
+ LZ4F_frameInfo_t* frameInfoPtr,
+ const void* srcBuffer, size_t* srcSizePtr);
</b><p> This function extracts frame parameters (max blockSize, dictID, etc.).
- Its usage is optional: user can call LZ4F_decompress() directly.
+ Its usage is optional: user can also invoke LZ4F_decompress() directly.
Extracted information will fill an existing LZ4F_frameInfo_t structure.
This can be useful for allocation and dictionary identification purposes.
@@ -301,10 +309,11 @@ LZ4F_errorCode_t LZ4F_freeDecompressionContext(LZ4F_dctx* dctx);
</p></pre><BR>
-<pre><b>size_t LZ4F_decompress(LZ4F_dctx* dctx,
- void* dstBuffer, size_t* dstSizePtr,
- const void* srcBuffer, size_t* srcSizePtr,
- const LZ4F_decompressOptions_t* dOptPtr);
+<pre><b>size_t
+LZ4F_decompress(LZ4F_dctx* dctx,
+ void* dstBuffer, size_t* dstSizePtr,
+ const void* srcBuffer, size_t* srcSizePtr,
+ const LZ4F_decompressOptions_t* dOptPtr);
</b><p> Call this function repetitively to regenerate data compressed in `srcBuffer`.
The function requires a valid dctx state.
@@ -352,10 +361,11 @@ LZ4F_errorCode_t LZ4F_freeDecompressionContext(LZ4F_dctx* dctx);
the maximum block size associated with blockSizeID.
</p></pre><BR>
-<pre><b>LZ4FLIB_STATIC_API size_t LZ4F_uncompressedUpdate(LZ4F_cctx* cctx,
- void* dstBuffer, size_t dstCapacity,
- const void* srcBuffer, size_t srcSize,
- const LZ4F_compressOptions_t* cOptPtr);
+<pre><b>LZ4FLIB_STATIC_API size_t
+LZ4F_uncompressedUpdate(LZ4F_cctx* cctx,
+ void* dstBuffer, size_t dstCapacity,
+ const void* srcBuffer, size_t srcSize,
+ const LZ4F_compressOptions_t* cOptPtr);
</b><p> LZ4F_uncompressedUpdate() can be called repetitively to add as much data uncompressed data as necessary.
Important rule: dstCapacity MUST be large enough to store the entire source buffer as
no compression is done for this operation
@@ -380,12 +390,12 @@ LZ4FLIB_STATIC_API void LZ4F_freeCDict(LZ4F_CDict* CDict);
`dictBuffer` can be released after LZ4_CDict creation, since its content is copied within CDict
</p></pre><BR>
-<pre><b>LZ4FLIB_STATIC_API size_t LZ4F_compressFrame_usingCDict(
- LZ4F_cctx* cctx,
- void* dst, size_t dstCapacity,
- const void* src, size_t srcSize,
- const LZ4F_CDict* cdict,
- const LZ4F_preferences_t* preferencesPtr);
+<pre><b>LZ4FLIB_STATIC_API size_t
+LZ4F_compressFrame_usingCDict(LZ4F_cctx* cctx,
+ void* dst, size_t dstCapacity,
+ const void* src, size_t srcSize,
+ const LZ4F_CDict* cdict,
+ const LZ4F_preferences_t* preferencesPtr);
</b><p> Compress an entire srcBuffer into a valid LZ4 frame using a digested Dictionary.
cctx must point to a context created by LZ4F_createCompressionContext().
If cdict==NULL, compress without a dictionary.
@@ -397,11 +407,11 @@ LZ4FLIB_STATIC_API void LZ4F_freeCDict(LZ4F_CDict* CDict);
or an error code if it fails (can be tested using LZ4F_isError())
</p></pre><BR>
-<pre><b>LZ4FLIB_STATIC_API size_t LZ4F_compressBegin_usingCDict(
- LZ4F_cctx* cctx,
- void* dstBuffer, size_t dstCapacity,
- const LZ4F_CDict* cdict,
- const LZ4F_preferences_t* prefsPtr);
+<pre><b>LZ4FLIB_STATIC_API size_t
+LZ4F_compressBegin_usingCDict(LZ4F_cctx* cctx,
+ void* dstBuffer, size_t dstCapacity,
+ const LZ4F_CDict* cdict,
+ const LZ4F_preferences_t* prefsPtr);
</b><p> Inits streaming dictionary compression, and writes the frame header into dstBuffer.
dstCapacity must be >= LZ4F_HEADER_SIZE_MAX bytes.
`prefsPtr` is optional : you may provide NULL as argument,
@@ -410,16 +420,36 @@ LZ4FLIB_STATIC_API void LZ4F_freeCDict(LZ4F_CDict* CDict);
or an error code (which can be tested using LZ4F_isError())
</p></pre><BR>
-<pre><b>LZ4FLIB_STATIC_API size_t LZ4F_decompress_usingDict(
- LZ4F_dctx* dctxPtr,
- void* dstBuffer, size_t* dstSizePtr,
- const void* srcBuffer, size_t* srcSizePtr,
- const void* dict, size_t dictSize,
- const LZ4F_decompressOptions_t* decompressOptionsPtr);
+<pre><b>LZ4FLIB_STATIC_API size_t
+LZ4F_decompress_usingDict(LZ4F_dctx* dctxPtr,
+ void* dstBuffer, size_t* dstSizePtr,
+ const void* srcBuffer, size_t* srcSizePtr,
+ const void* dict, size_t dictSize,
+ const LZ4F_decompressOptions_t* decompressOptionsPtr);
</b><p> Same as LZ4F_decompress(), using a predefined dictionary.
Dictionary is used "in place", without any preprocessing.
It must remain accessible throughout the entire frame decoding.
</p></pre><BR>
+<pre><b>typedef void* (*LZ4F_AllocFunction) (void* opaqueState, size_t size);
+typedef void* (*LZ4F_CallocFunction) (void* opaqueState, size_t size);
+typedef void (*LZ4F_FreeFunction) (void* opaqueState, void* address);
+typedef struct {
+ LZ4F_AllocFunction customAlloc;
+ LZ4F_CallocFunction customCalloc; </b>/* optional; when not defined, uses customAlloc + memset */<b>
+ LZ4F_FreeFunction customFree;
+ void* opaqueState;
+} LZ4F_CustomMem;
+static
+#ifdef __GNUC__
+__attribute__((__unused__))
+#endif
+LZ4F_CustomMem const LZ4F_defaultCMem = { NULL, NULL, NULL, NULL }; </b>/**< this constant defers to stdlib's functions */<b>
+</b><p> These prototypes make it possible to pass custom allocation/free functions.
+ LZ4F_customMem is provided at state creation time, using LZ4F_create*_advanced() listed below.
+ All allocation/free operations will be completed using these custom variants instead of regular <stdlib.h> ones.
+
+</p></pre><BR>
+
</html>
</body>
diff --git a/lib/README.md b/lib/README.md
index c9916a98..08d1cef2 100644
--- a/lib/README.md
+++ b/lib/README.md
@@ -77,7 +77,7 @@ The following build macro can be selected to adjust source code behavior at comp
Set to 65535 by default, which is the maximum value supported by lz4 format.
Reducing maximum distance will reduce opportunities for LZ4 to find matches,
hence will produce a worse compression ratio.
- However, a smaller max distance can allow compatibility with specific decoders using limited memory budget.
+ Setting a smaller max distance could allow compatibility with specific decoders with limited memory budget.
This build macro only influences the compressed output of the compressor.
- `LZ4_DISABLE_DEPRECATE_WARNINGS` : invoking a deprecated function will make the compiler generate a warning.
@@ -88,10 +88,6 @@ The following build macro can be selected to adjust source code behavior at comp
This build macro offers another project-specific method
by defining `LZ4_DISABLE_DEPRECATE_WARNINGS` before including the LZ4 header files.
-- `LZ4_USER_MEMORY_FUNCTIONS` : replace calls to <stdlib>'s `malloc`, `calloc` and `free`
- by user-defined functions, which must be called `LZ4_malloc()`, `LZ4_calloc()` and `LZ4_free()`.
- User functions must be available at link time.
-
- `LZ4_FORCE_SW_BITCOUNT` : by default, the compression algorithm tries to determine lengths
by using bitcount instructions, generally implemented as fast single instructions in many cpus.
In case the target cpus doesn't support it, or compiler intrinsic doesn't work, or feature bad performance,
@@ -104,17 +100,21 @@ The following build macro can be selected to adjust source code behavior at comp
passed as argument to become a compression state is suitably aligned.
This test can be disabled if it proves flaky, by setting this value to 0.
-- `LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION` : some LZ4/HC (level 1 and 2) public
- functions internally invoke dynamic memory allocation functions of the C standard library.
- By defining this build macro, these LZ4/HC functions are disabled to ensure to remove
- dependency to the standard library.
- See also the description of this macro in lib/lz4.c.
+- `LZ4_USER_MEMORY_FUNCTIONS` : replace calls to `<stdlib,h>`'s `malloc()`, `calloc()` and `free()`
+ by user-defined functions, which must be named `LZ4_malloc()`, `LZ4_calloc()` and `LZ4_free()`.
+ User functions must be available at link time.
-- `LZ4_FREESTANDING` : by setting this build macro to 1, LZ4/HC (level 1 and 2) removes
- dependencies on the C standard library, including memmove, memcpy, and memset.
+- `LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION` :
+ Remove support of dynamic memory allocation.
+ For more details, see description of this macro in `lib/lz4.c`.
+
+- `LZ4_FREESTANDING` : by setting this build macro to 1,
+ LZ4/HC removes dependencies on the C standard library,
+ including allocation functions and `memmove()`, `memcpy()`, and `memset()`.
This build macro is designed to help use LZ4/HC in restricted environments
(embedded, bootloader, etc).
- See also the description of this macro in lib/lz4.h.
+ For more details, see description of this macro in `lib/lz4.h`.
+
#### Amalgamation
diff --git a/programs/lz4.1 b/programs/lz4.1
index d758ed59..7cb98d63 100644
--- a/programs/lz4.1
+++ b/programs/lz4.1
@@ -1,5 +1,5 @@
.
-.TH "LZ4" "1" "July 2019" "lz4 1.9.2" "User Commands"
+.TH "LZ4" "1" "August 2022" "lz4 v1.9.4" "User Commands"
.
.SH "NAME"
\fBlz4\fR \- lz4, unlz4, lz4cat \- Compress or decompress \.lz4 files
@@ -17,7 +17,7 @@
When writing scripts that need to decompress files, it is recommended to always use the name \fBlz4\fR with appropriate arguments (\fBlz4 \-d\fR or \fBlz4 \-dc\fR) instead of the names \fBunlz4\fR and \fBlz4cat\fR\.
.
.SH "DESCRIPTION"
-\fBlz4\fR is an extremely fast lossless compression algorithm, based on \fBbyte\-aligned LZ77\fR family of compression scheme\. \fBlz4\fR offers compression speeds of 400 MB/s per core, linearly scalable with multi\-core CPUs\. It features an extremely fast decoder, with speed in multiple GB/s per core, typically reaching RAM speed limit on multi\-core systems\. The native file format is the \fB\.lz4\fR format\.
+\fBlz4\fR is an extremely fast lossless compression algorithm, based on \fBbyte\-aligned LZ77\fR family of compression scheme\. \fBlz4\fR offers compression speeds > 500 MB/s per core, linearly scalable with multi\-core CPUs\. It features an extremely fast decoder, offering speed in multiple GB/s per core, typically reaching RAM speed limit on multi\-core systems\. The native file format is the \fB\.lz4\fR format\.
.
.SS "Difference between lz4 and gzip"
\fBlz4\fR supports a command line syntax similar \fIbut not identical\fR to \fBgzip(1)\fR\. Differences are :
@@ -32,7 +32,7 @@ When writing scripts that need to decompress files, it is recommended to always
\fBlz4 file\.lz4\fR will default to decompression (use \fB\-z\fR to force compression)
.
.IP "\(bu" 4
-\fBlz4\fR preserves original files
+\fBlz4\fR preserves original files (see \fB\-\-rm\fR to erase source file on completion)
.
.IP "\(bu" 4
\fBlz4\fR shows real\-time notification statistics during compression or decompression of a single file (use \fB\-q\fR to silence them)
@@ -121,7 +121,7 @@ Switch to ultra\-fast compression levels\. The higher the value, the faster the
.
.TP
\fB\-\-best\fR
-Set highest compression level\. Same as -12\.
+Set highest compression level\. Same as \-12\.
.
.TP
\fB\-\-favor\-decSpeed\fR
@@ -169,10 +169,18 @@ Produce independent blocks (default)
Blocks depend on predecessors (improves compression ratio, more noticeable on small blocks)
.
.TP
+\fB\-BX\fR
+Generate block checksums (default:disabled)
+.
+.TP
\fB\-\-[no\-]frame\-crc\fR
Select frame checksum (default:enabled)
.
.TP
+\fB\-\-no\-crc\fR
+Disable both frame and block checksums
+.
+.TP
\fB\-\-[no\-]content\-size\fR
Header includes original size (default:not present)
.
diff --git a/programs/lz4.1.md b/programs/lz4.1.md
index 39dc9254..06c06cf0 100644
--- a/programs/lz4.1.md
+++ b/programs/lz4.1.md
@@ -20,9 +20,9 @@ DESCRIPTION
`lz4` is an extremely fast lossless compression algorithm,
based on **byte-aligned LZ77** family of compression scheme.
-`lz4` offers compression speeds of 400 MB/s per core, linearly scalable with
-multi-core CPUs.
-It features an extremely fast decoder, with speed in multiple GB/s per core,
+`lz4` offers compression speeds > 500 MB/s per core,
+linearly scalable with multi-core CPUs.
+It features an extremely fast decoder, offering speed in multiple GB/s per core,
typically reaching RAM speed limit on multi-core systems.
The native file format is the `.lz4` format.
@@ -34,7 +34,7 @@ Differences are :
* `lz4` compresses a single file by default (see `-m` for multiple files)
* `lz4 file1 file2` means : compress file1 _into_ file2
* `lz4 file.lz4` will default to decompression (use `-z` to force compression)
- * `lz4` preserves original files
+ * `lz4` preserves original files (see `--rm` to erase source file on completion)
* `lz4` shows real-time notification statistics
during compression or decompression of a single file
(use `-q` to silence them)
@@ -185,6 +185,9 @@ only the latest one will be applied.
* `-BD`:
Blocks depend on predecessors (improves compression ratio, more noticeable on small blocks)
+* `-BX`:
+ Generate block checksums (default:disabled)
+
* `--[no-]frame-crc`:
Select frame checksum (default:enabled)