Skip to content

Commit 03e647a

Browse files
committed
Renames ZSTD compression functions for consistency
Updates function names from zstd_compress_* to zstd_transform_* to align with naming conventions used by other compression algorithms in the codebase. Improves code consistency and maintainability by standardizing function naming patterns across different compression implementations.
1 parent 4608bad commit 03e647a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

plugins/compress/compress.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ handle_range_request(TSMBuffer req_buf, TSMLoc req_loc, HostConfiguration *hc)
134134

135135
// Forward declarations for ZSTD compression functions
136136
#if HAVE_ZSTD_H
137-
static void zstd_compress_init(Data *data);
138-
static void zstd_compress_finish(Data *data);
139-
static void zstd_compress_one(Data *data, const char *upstream_buffer, int64_t upstream_length);
137+
static void zstd_transform_init(Data *data);
138+
static void zstd_transform_finish(Data *data);
139+
static void zstd_transform_one(Data *data, const char *upstream_buffer, int64_t upstream_length);
140140
#endif
141141

142142
static Data *
@@ -390,7 +390,7 @@ compress_transform_init(TSCont contp, Data *data)
390390

391391
#if HAVE_ZSTD_H
392392
if (data->compression_type & COMPRESSION_TYPE_ZSTD) {
393-
zstd_compress_init(data);
393+
zstd_transform_init(data);
394394
if (!data->zstrm_zstd.cctx) {
395395
TSError("Failed to create Zstandard compression context");
396396
return;
@@ -505,7 +505,7 @@ brotli_transform_one(Data *data, const char *upstream_buffer, int64_t upstream_l
505505

506506
#if HAVE_ZSTD_H
507507
static void
508-
zstd_compress_init(Data *data)
508+
zstd_transform_init(Data *data)
509509
{
510510
if (!data->zstrm_zstd.cctx) {
511511
error("Failed to initialize Zstd compression context");
@@ -530,7 +530,7 @@ zstd_compress_init(Data *data)
530530
}
531531

532532
static void
533-
zstd_compress_finish(Data *data)
533+
zstd_transform_finish(Data *data)
534534
{
535535
if (data->state == transform_state_output) {
536536
TSIOBufferBlock downstream_blkp;
@@ -570,7 +570,7 @@ zstd_compress_finish(Data *data)
570570
}
571571

572572
static void
573-
zstd_compress_one(Data *data, const char *upstream_buffer, int64_t upstream_length)
573+
zstd_transform_one(Data *data, const char *upstream_buffer, int64_t upstream_length)
574574
{
575575
TSIOBufferBlock downstream_blkp;
576576
int64_t downstream_length;
@@ -633,7 +633,7 @@ compress_transform_one(Data *data, TSIOBufferReader upstream_reader, int amount)
633633

634634
#if HAVE_ZSTD_H
635635
if (data->compression_type & COMPRESSION_TYPE_ZSTD && (data->compression_algorithms & ALGORITHM_ZSTD)) {
636-
zstd_compress_one(data, upstream_buffer, upstream_length);
636+
zstd_transform_one(data, upstream_buffer, upstream_length);
637637
} else
638638
#endif
639639
#if HAVE_BROTLI_ENCODE_H
@@ -725,7 +725,7 @@ compress_transform_finish(Data *data)
725725
{
726726
#if HAVE_ZSTD_H
727727
if (data->compression_type & COMPRESSION_TYPE_ZSTD && data->compression_algorithms & ALGORITHM_ZSTD) {
728-
zstd_compress_finish(data);
728+
zstd_transform_finish(data);
729729
debug("compress_transform_finish: zstd compression finish");
730730
} else
731731
#endif

0 commit comments

Comments
 (0)