Merge pull request #903 from lz4/nofastforce

removed LZ4_compress_fast_force()
This commit is contained in:
Yann Collet 2020-08-24 11:28:47 -07:00 committed by GitHub
commit e46fa0ff71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1288,22 +1288,6 @@ int LZ4_compress_default(const char* src, char* dst, int srcSize, int maxOutputS
}
/* hidden debug function */
/* strangely enough, gcc generates faster code when this function is uncommented, even if unused */
int LZ4_compress_fast_force(const char* src, char* dst, int srcSize, int dstCapacity, int acceleration)
{
LZ4_stream_t ctx;
LZ4_initStream(&ctx, sizeof(ctx));
if (srcSize < LZ4_64Klimit) {
return LZ4_compress_generic(&ctx.internal_donotuse, src, dst, srcSize, NULL, dstCapacity, limitedOutput, byU16, noDict, noDictIssue, acceleration);
} else {
tableType_t const addrMode = (sizeof(void*) > 4) ? byU32 : byPtr;
return LZ4_compress_generic(&ctx.internal_donotuse, src, dst, srcSize, NULL, dstCapacity, limitedOutput, addrMode, noDict, noDictIssue, acceleration);
}
}
/* Note!: This function leaves the stream in an unclean/broken state!
* It is not safe to subsequently use the same state with a _fastReset() or
* _continue() call without resetting it. */