JakeChampion commented on code in PR #12201:
URL: https://github.com/apache/trafficserver/pull/12201#discussion_r2486650535
##########
plugins/compress/compress.cc:
##########
@@ -467,6 +504,144 @@ brotli_transform_one(Data *data, const char
*upstream_buffer, int64_t upstream_l
}
#endif
+#if HAVE_ZSTD_H
+static bool
+zstd_compress_operation(Data *data, const char *upstream_buffer, int64_t
upstream_length, ZSTD_EndDirective mode)
+{
+ TSIOBufferBlock downstream_blkp;
+ int64_t downstream_length;
+
+ ZSTD_inBuffer input = {upstream_buffer,
static_cast<size_t>(upstream_length), 0};
Review Comment:
good catch! fixed in [`b87c864`
(#12201)](https://github.com/apache/trafficserver/pull/12201/commits/b87c8645cdba70aff9f104c97b38ebaacf924b27)
##########
plugins/compress/compress.cc:
##########
@@ -467,6 +504,144 @@ brotli_transform_one(Data *data, const char
*upstream_buffer, int64_t upstream_l
}
#endif
+#if HAVE_ZSTD_H
+static bool
+zstd_compress_operation(Data *data, const char *upstream_buffer, int64_t
upstream_length, ZSTD_EndDirective mode)
+{
+ TSIOBufferBlock downstream_blkp;
+ int64_t downstream_length;
+
+ ZSTD_inBuffer input = {upstream_buffer,
static_cast<size_t>(upstream_length), 0};
+
+ for (;;) {
+ downstream_blkp = TSIOBufferStart(data->downstream_buffer);
+ char *downstream_buffer = TSIOBufferBlockWriteStart(downstream_blkp,
&downstream_length);
+
+ ZSTD_outBuffer output = {downstream_buffer,
static_cast<size_t>(downstream_length), 0};
Review Comment:
completed in [`1b1ed1c`
(#12201)](https://github.com/apache/trafficserver/pull/12201/commits/1b1ed1c54c599818ab38ee6ee043988868ce01e1)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]