codekingpro/portable-devtools
114k
1/*
2 * SPDX-FileCopyrightText: Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES.
3 * All rights reserved. SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4 *
5 * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6 * property and proprietary rights in and to this material, related
7 * documentation and any modifications thereto. Any use, reproduction,
8 * disclosure or distribution of this material and related documentation
9 * without an express license agreement from NVIDIA CORPORATION or
10 * its affiliates is strictly prohibited.
11*/
12
13#pragma once
14
15#include "nvcompManager.hpp"
16#include "formatSpec.hpp"
17#include "gzip.h"
18
19namespace nvcomp {
20
21/**
22 * @brief High-level interface class for the Gzip compressor.
23 *
24 * @note If user_stream is specified, the lifetime of the GzipManager instance must not
25 * extend beyond that of the user_stream.
26 */
27struct GzipManager : detail::PimplManager {
28 /**
29 * @brief Constructor of GzipManager.
30 *
31 * @param[in] uncomp_chunk_size Internal chunk size used to partition the input data.
32 * @param[in] compress_opts Compression options to use.
33 * @param[in] decompress_opts Decompression options to use.
34 * @param[in] user_stream The CUDA stream to operate on.
35 * @param[in] checksum_policy The checksum policy to use during compression and decompression.
36 * @param[in] bitstream_kind Setting to configure how the manager compresses the input.
37 */
38 NVCOMP_EXPORT
39 GzipManager(
40 size_t uncomp_chunk_size,
41 const nvcompBatchedGzipCompressOpts_t& compress_opts = nvcompBatchedGzipCompressDefaultOpts,
42 const nvcompBatchedGzipDecompressOpts_t& decompress_opts = nvcompBatchedGzipDecompressDefaultOpts,
43 cudaStream_t user_stream = 0,
44 ChecksumPolicy checksum_policy = NoComputeNoVerify,
45 BitstreamKind bitstream_kind = BitstreamKind::NVCOMP_NATIVE);
46
47 /**
48 * @brief Destructor of GzipManager.
49 */
50 NVCOMP_EXPORT
51 ~GzipManager() noexcept;
52};
53
54} // namespace nvcomp
55 