Updated streaming examples
This commit is contained in:
parent
1b17bf2ab8
commit
1171303a4f
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user