summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2015-05-03 18:02:48 +0100
committerYann Collet <yann.collet.73@gmail.com>2015-05-03 18:02:48 +0100
commit1171303a4ff6566f7f9d4b1f91d4d73f0bf00584 (patch)
treef61e8a4c778b60c4a40009e0f4a456e822edbe13 /examples
parent1b17bf2ab8cf66dd2b740eca376e2d46f7ad7041 (diff)
downloadlz4-1171303a4ff6566f7f9d4b1f91d4d73f0bf00584.tar.gz
lz4-1171303a4ff6566f7f9d4b1f91d4d73f0bf00584.tar.bz2
lz4-1171303a4ff6566f7f9d4b1f91d4d73f0bf00584.zip
Updated streaming examples
Diffstat (limited to 'examples')
-rw-r--r--examples/blockStreaming_doubleBuffer.c4
-rw-r--r--examples/blockStreaming_lineByLine.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/blockStreaming_doubleBuffer.c b/examples/blockStreaming_doubleBuffer.c
index 58f2bdb..59355da 100644
--- a/examples/blockStreaming_doubleBuffer.c
+++ b/examples/blockStreaming_doubleBuffer.c
@@ -53,8 +53,8 @@ void test_compress(FILE* outFp, FILE* inpFp)
{
char cmpBuf[LZ4_COMPRESSBOUND(BLOCK_BYTES)];
- const int cmpBytes = LZ4_compress_safe_continue(
- lz4Stream, inpPtr, cmpBuf, inpBytes, sizeof(cmpBuf));
+ const int cmpBytes = LZ4_compress_fast_continue(
+ lz4Stream, inpPtr, cmpBuf, inpBytes, sizeof(cmpBuf), 1);
if(cmpBytes <= 0) {
break;
}
diff --git a/examples/blockStreaming_lineByLine.c b/examples/blockStreaming_lineByLine.c
index 8ae268f..c4fd2e3 100644
--- a/examples/blockStreaming_lineByLine.c
+++ b/examples/blockStreaming_lineByLine.c
@@ -64,8 +64,8 @@ static void test_compress(
#endif
{
- const int cmpBytes = LZ4_compress_safe_continue(
- lz4Stream, inpPtr, cmpBuf, inpBytes, cmpBufBytes);
+ const int cmpBytes = LZ4_compress_fast_continue(
+ lz4Stream, inpPtr, cmpBuf, inpBytes, cmpBufBytes, 1);
if (cmpBytes <= 0) break;
write_uint16(outFp, (uint16_t) cmpBytes);
write_bin(outFp, cmpBuf, cmpBytes);