This is an automated email from the ASF dual-hosted git repository.
exceptionfactory pushed a commit to branch support/nifi-1.x
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/support/nifi-1.x by this push:
new bf45bebbc0 NIFI-13002 Restored zstd Compression Level in
CompressContent
bf45bebbc0 is described below
commit bf45bebbc00b745c5d7ef81e95b6672a5dfd6900
Author: Joseph Witt <[email protected]>
AuthorDate: Thu Apr 4 11:19:54 2024 -0700
NIFI-13002 Restored zstd Compression Level in CompressContent
This closes #8604
Signed-off-by: David Handermann <[email protected]>
(cherry picked from commit 7f5680d1fed374666ee92fd9e43c9d660507c467)
---
.../main/java/org/apache/nifi/processors/standard/CompressContent.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/CompressContent.java
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/CompressContent.java
index 90e190e8cb..306eeb7c4a 100644
---
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/CompressContent.java
+++
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/CompressContent.java
@@ -348,7 +348,8 @@ public class CompressContent extends AbstractProcessor {
compressionOut = new
CompressorStreamFactory().createCompressorOutputStream(compressionFormat.toLowerCase(),
bufferedOut);
break;
case COMPRESSION_FORMAT_ZSTD:
- compressionOut = new
ZstdCompressorOutputStream(bufferedOut);
+ final int zstdCompressionLevel =
context.getProperty(COMPRESSION_LEVEL).asInteger() * 2;
+ compressionOut = new
ZstdCompressorOutputStream(bufferedOut, zstdCompressionLevel);
mimeTypeRef.set("application/zstd");
break;
case COMPRESSION_FORMAT_BROTLI: