summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <Cyan4973@users.noreply.github.com>2018-01-14 04:56:14 (GMT)
committerGitHub <noreply@github.com>2018-01-14 04:56:14 (GMT)
commite0e29cf09e12aa8e98275a736e98fba7eed93b3f (patch)
treea01ba20be4299d3e3603cdb9e5439c8be6a5d57e
parentd6f1fe105b6f472f173ba63c06eb518923186115 (diff)
parent52a76ff682042a310528c1c1bbe0d75c28131449 (diff)
downloadlz4-e0e29cf09e12aa8e98275a736e98fba7eed93b3f.zip
lz4-e0e29cf09e12aa8e98275a736e98fba7eed93b3f.tar.gz
lz4-e0e29cf09e12aa8e98275a736e98fba7eed93b3f.tar.bz2
Merge pull request #449 from lz4/dev
v1.8.1.2
-rw-r--r--Makefile2
-rw-r--r--doc/lz4_manual.html4
-rw-r--r--doc/lz4frame_manual.html29
-rw-r--r--lib/lz4.h2
-rw-r--r--lib/lz4frame.h27
-rw-r--r--programs/Makefile4
-rw-r--r--programs/lz4.15
7 files changed, 43 insertions, 30 deletions
diff --git a/Makefile b/Makefile
index 76fc9a8..0aa1b9d 100644
--- a/Makefile
+++ b/Makefile
@@ -82,7 +82,7 @@ clean:
@$(MAKE) -C $(PRGDIR) $@ > $(VOID)
@$(MAKE) -C $(TESTDIR) $@ > $(VOID)
@$(MAKE) -C $(EXDIR) $@ > $(VOID)
- @$(MAKE) -C contrib/gen_manual $@
+ @$(MAKE) -C contrib/gen_manual $@ > $(VOID)
@$(RM) lz4$(EXT)
@echo Cleaning completed
diff --git a/doc/lz4_manual.html b/doc/lz4_manual.html
index 4c9c7de..6b7935d 100644
--- a/doc/lz4_manual.html
+++ b/doc/lz4_manual.html
@@ -1,10 +1,10 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>1.8.0 Manual</title>
+<title>1.8.1 Manual</title>
</head>
<body>
-<h1>1.8.0 Manual</h1>
+<h1>1.8.1 Manual</h1>
<hr>
<a name="Contents"></a><h2>Contents</h2>
<ol>
diff --git a/doc/lz4frame_manual.html b/doc/lz4frame_manual.html
index 7529f6e..590c632 100644
--- a/doc/lz4frame_manual.html
+++ b/doc/lz4frame_manual.html
@@ -1,10 +1,10 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>1.8.0 Manual</title>
+<title>1.8.1 Manual</title>
</head>
<body>
-<h1>1.8.0 Manual</h1>
+<h1>1.8.1 Manual</h1>
<hr>
<a name="Contents"></a><h2>Contents</h2>
<ol>
@@ -242,35 +242,40 @@ LZ4F_errorCode_t LZ4F_freeDecompressionContext(LZ4F_dctx* dctx);
const void* srcBuffer, size_t* srcSizePtr,
const LZ4F_decompressOptions_t* dOptPtr);
</b><p> Call this function repetitively to regenerate compressed data from `srcBuffer`.
- The function will attempt to decode up to *srcSizePtr bytes from srcBuffer, into dstBuffer of capacity *dstSizePtr.
+ The function will read up to *srcSizePtr bytes from srcBuffer,
+ and decompress data into dstBuffer, of capacity *dstSizePtr.
- The number of bytes regenerated into dstBuffer is provided within *dstSizePtr (necessarily <= original value).
+ The number of bytes consumed from srcBuffer will be written into *srcSizePtr (necessarily <= original value).
+ The number of bytes decompressed into dstBuffer will be written into *dstSizePtr (necessarily <= original value).
- The number of bytes consumed from srcBuffer is provided within *srcSizePtr (necessarily <= original value).
- Number of bytes consumed can be < number of bytes provided.
- It typically happens when dstBuffer is not large enough to contain all decoded data.
+ The function does not necessarily read all input bytes, so always check value in *srcSizePtr.
Unconsumed source data must be presented again in subsequent invocations.
- `dstBuffer` content is expected to be flushed between each invocation, as its content will be overwritten.
- `dstBuffer` itself can be changed at will between each consecutive function invocation.
+ `dstBuffer` can freely change between each consecutive function invocation.
+ `dstBuffer` content will be overwritten.
@return : an hint of how many `srcSize` bytes LZ4F_decompress() expects for next call.
Schematically, it's the size of the current (or remaining) compressed block + header of next block.
Respecting the hint provides some small speed benefit, because it skips intermediate buffers.
This is just a hint though, it's always possible to provide any srcSize.
+
When a frame is fully decoded, @return will be 0 (no more data expected).
+ When provided with more bytes than necessary to decode a frame,
+ LZ4F_decompress() will stop reading exactly at end of current frame, and @return 0.
+
If decompression failed, @return is an error code, which can be tested using LZ4F_isError().
+ After a decompression error, the `dctx` context is not resumable.
+ Use LZ4F_resetDecompressionContext() to return to clean state.
After a frame is fully decoded, dctx can be used again to decompress another frame.
- After a decompression error, use LZ4F_resetDecompressionContext() before re-using dctx, to return to clean state.
</p></pre><BR>
<pre><b>void LZ4F_resetDecompressionContext(LZ4F_dctx* dctx); </b>/* always successful */<b>
</b><p> In case of an error, the context is left in "undefined" state.
In which case, it's necessary to reset it, before re-using it.
- This method can also be used to abruptly stop an unfinished decompression,
- and start a new one using the same context.
+ This method can also be used to abruptly stop any unfinished decompression,
+ and start a new one using same context resources.
</p></pre><BR>
</html>
diff --git a/lib/lz4.h b/lib/lz4.h
index 3cf6c8d..a06b8a4 100644
--- a/lib/lz4.h
+++ b/lib/lz4.h
@@ -93,7 +93,7 @@ extern "C" {
/*------ Version ------*/
#define LZ4_VERSION_MAJOR 1 /* for breaking interface changes */
#define LZ4_VERSION_MINOR 8 /* for new (non-breaking) interface capabilities */
-#define LZ4_VERSION_RELEASE 0 /* for tweaks, bug-fixes, or development */
+#define LZ4_VERSION_RELEASE 1 /* for tweaks, bug-fixes, or development */
#define LZ4_VERSION_NUMBER (LZ4_VERSION_MAJOR *100*100 + LZ4_VERSION_MINOR *100 + LZ4_VERSION_RELEASE)
diff --git a/lib/lz4frame.h b/lib/lz4frame.h
index 88a6513..675aeeb 100644
--- a/lib/lz4frame.h
+++ b/lib/lz4frame.h
@@ -347,27 +347,32 @@ LZ4FLIB_API size_t LZ4F_getFrameInfo(LZ4F_dctx* dctx,
/*! LZ4F_decompress() :
* Call this function repetitively to regenerate compressed data from `srcBuffer`.
- * The function will attempt to decode up to *srcSizePtr bytes from srcBuffer, into dstBuffer of capacity *dstSizePtr.
+ * The function will read up to *srcSizePtr bytes from srcBuffer,
+ * and decompress data into dstBuffer, of capacity *dstSizePtr.
*
- * The number of bytes regenerated into dstBuffer is provided within *dstSizePtr (necessarily <= original value).
+ * The number of bytes consumed from srcBuffer will be written into *srcSizePtr (necessarily <= original value).
+ * The number of bytes decompressed into dstBuffer will be written into *dstSizePtr (necessarily <= original value).
*
- * The number of bytes consumed from srcBuffer is provided within *srcSizePtr (necessarily <= original value).
- * Number of bytes consumed can be < number of bytes provided.
- * It typically happens when dstBuffer is not large enough to contain all decoded data.
+ * The function does not necessarily read all input bytes, so always check value in *srcSizePtr.
* Unconsumed source data must be presented again in subsequent invocations.
*
- * `dstBuffer` content is expected to be flushed between each invocation, as its content will be overwritten.
- * `dstBuffer` itself can be changed at will between each consecutive function invocation.
+ * `dstBuffer` can freely change between each consecutive function invocation.
+ * `dstBuffer` content will be overwritten.
*
* @return : an hint of how many `srcSize` bytes LZ4F_decompress() expects for next call.
* Schematically, it's the size of the current (or remaining) compressed block + header of next block.
* Respecting the hint provides some small speed benefit, because it skips intermediate buffers.
* This is just a hint though, it's always possible to provide any srcSize.
+ *
* When a frame is fully decoded, @return will be 0 (no more data expected).
+ * When provided with more bytes than necessary to decode a frame,
+ * LZ4F_decompress() will stop reading exactly at end of current frame, and @return 0.
+ *
* If decompression failed, @return is an error code, which can be tested using LZ4F_isError().
+ * After a decompression error, the `dctx` context is not resumable.
+ * Use LZ4F_resetDecompressionContext() to return to clean state.
*
* After a frame is fully decoded, dctx can be used again to decompress another frame.
- * After a decompression error, use LZ4F_resetDecompressionContext() before re-using dctx, to return to clean state.
*/
LZ4FLIB_API size_t LZ4F_decompress(LZ4F_dctx* dctx,
void* dstBuffer, size_t* dstSizePtr,
@@ -375,11 +380,11 @@ LZ4FLIB_API size_t LZ4F_decompress(LZ4F_dctx* dctx,
const LZ4F_decompressOptions_t* dOptPtr);
-/*! LZ4F_resetDecompressionContext() : v1.8.0
+/*! LZ4F_resetDecompressionContext() : added in v1.8.0
* In case of an error, the context is left in "undefined" state.
* In which case, it's necessary to reset it, before re-using it.
- * This method can also be used to abruptly stop an unfinished decompression,
- * and start a new one using the same context. */
+ * This method can also be used to abruptly stop any unfinished decompression,
+ * and start a new one using same context resources. */
LZ4FLIB_API void LZ4F_resetDecompressionContext(LZ4F_dctx* dctx); /* always successful */
diff --git a/programs/Makefile b/programs/Makefile
index ed1a779..a51bd4b 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -88,8 +88,8 @@ lz4c32: CFLAGS += -m32
lz4c32 : $(SRCFILES)
$(CC) $(FLAGS) $^ -o $@$(EXT)
-lz4.1: lz4.1.md
- cat $^ | $(MD2ROFF) $(MD2ROFF_FLAGS) | sed -n '/^\.\\\".*/!p' > $@
+lz4.1: lz4.1.md $(LIBVER_SRC)
+ cat $< | $(MD2ROFF) $(MD2ROFF_FLAGS) | sed -n '/^\.\\\".*/!p' > $@
man: lz4.1
diff --git a/programs/lz4.1 b/programs/lz4.1
index 7ce5da0..e0f6a81 100644
--- a/programs/lz4.1
+++ b/programs/lz4.1
@@ -1,5 +1,5 @@
.
-.TH "LZ4" "1" "July 2017" "lz4 1.8.0" "User Commands"
+.TH "LZ4" "1" "2018-01-13" "lz4 1.8.1" "User Commands"
.
.SH "NAME"
\fBlz4\fR \- lz4, unlz4, lz4cat \- Compress or decompress \.lz4 files
@@ -46,6 +46,9 @@ If no destination name is provided, \fBand\fR if \fBstdout\fR is the console, \f
.IP "\(bu" 4
As a consequence of previous rules, note the following example : \fBlz4 file | consumer\fR sends compressed data to \fBconsumer\fR through \fBstdout\fR, hence it does \fInot\fR create \fBfile\.lz4\fR\.
.
+.IP "\(bu" 4
+Another consequence of those rules is that to run \fBlz4\fR under \fBnohup\fR, you should provide a destination file: \fBnohup lz4 file file\.lz4\fR, because \fBnohup\fR writes the specified command\'s output to a file\.
+.
.IP "" 0
.
.P