Updated streaming examples

This commit is contained in:
Yann Collet 2015-05-03 18:02:48 +01:00
parent 1b17bf2ab8
commit 1171303a4f
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -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);