Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
snappy.hpp54 linesDownload Raw Back to nvcomp
1/*
2 * SPDX-FileCopyrightText: Copyright (c) 2022-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 "snappy.h"
17
18namespace nvcomp {
19
20/**
21 * @brief High-level interface class for the Snappy compressor.
22 *
23 * @note If user_stream is specified, the lifetime of the SnappyManager instance must not
24 * extend beyond that of the user_stream.
25 */
26struct SnappyManager : detail::PimplManager {
27  /**
28   * @brief Constructor of SnappyManager.
29   *
30   * @param[in] uncomp_chunk_size Internal chunk size used to partition the input data.
31   * @param[in] compress_opts Compression options to use.
32   * @param[in] decompress_opts Decompression options to use.
33   * @param[in] user_stream The CUDA stream to operate on.
34   * @param[in] checksum_policy The checksum policy to use during compression and decompression.
35   * @param[in] bitstream_kind Setting to configure how the manager compresses the input.
36   */
37  NVCOMP_EXPORT
38  SnappyManager(
39    size_t uncomp_chunk_size,
40    const nvcompBatchedSnappyCompressOpts_t& compress_opts = nvcompBatchedSnappyCompressDefaultOpts,
41    const nvcompBatchedSnappyDecompressOpts_t& decompress_opts = nvcompBatchedSnappyDecompressDefaultOpts,
42    cudaStream_t user_stream = 0,
43    ChecksumPolicy checksum_policy = NoComputeNoVerify,
44    BitstreamKind bitstream_kind = BitstreamKind::NVCOMP_NATIVE);
45
46  /**
47   * @brief Destructor of SnappyManager.
48   */
49  NVCOMP_EXPORT
50  ~SnappyManager() noexcept;
51};
52
53} // namespace nvcomp
54 
codekingpro/portable-devtools · Team Ai