VTK  9.4.20241118
vtkLZ4DataCompressor.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
14#ifndef vtkLZ4DataCompressor_h
15#define vtkLZ4DataCompressor_h
16
17#include "vtkDataCompressor.h"
18#include "vtkIOCoreModule.h" // For export macro
19
20VTK_ABI_NAMESPACE_BEGIN
21class VTKIOCORE_EXPORT vtkLZ4DataCompressor : public vtkDataCompressor
22{
23public:
25 void PrintSelf(ostream& os, vtkIndent indent) override;
27
34 size_t GetMaximumCompressionSpace(size_t size) override;
38 // Compression level getter required by vtkDataCompressor.
39 int GetCompressionLevel() override;
40
41 // Compression level setter required by vtkDataCompresor.
42 void SetCompressionLevel(int compressionLevel) override;
43
44 // Direct setting of AccelerationLevel allows more direct
45 // control over LZ4 compressor
46 vtkSetClampMacro(AccelerationLevel, int, 1, VTK_INT_MAX);
47 vtkGetMacro(AccelerationLevel, int);
48
49protected:
52
54
55 // Compression method required by vtkDataCompressor.
56 size_t CompressBuffer(unsigned char const* uncompressedData, size_t uncompressedSize,
57 unsigned char* compressedData, size_t compressionSpace) override;
58 // Decompression method required by vtkDataCompressor.
59 size_t UncompressBuffer(unsigned char const* compressedData, size_t compressedSize,
60 unsigned char* uncompressedData, size_t uncompressedSize) override;
61
62private:
64 void operator=(const vtkLZ4DataCompressor&) = delete;
65};
66
67VTK_ABI_NAMESPACE_END
68#endif
Abstract interface for data compression classes.
a simple class to control print indentation
Definition vtkIndent.h:108
Data compression using LZ4.
~vtkLZ4DataCompressor() override
void SetCompressionLevel(int compressionLevel) override
Compression performance varies greatly with compression level Require level setting from any vtkDataC...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int GetCompressionLevel() override
Get/Set the compression level.
size_t GetMaximumCompressionSpace(size_t size) override
Get the maximum space that may be needed to store data of the given uncompressed size after compressi...
size_t UncompressBuffer(unsigned char const *compressedData, size_t compressedSize, unsigned char *uncompressedData, size_t uncompressedSize) override
size_t CompressBuffer(unsigned char const *uncompressedData, size_t uncompressedSize, unsigned char *compressedData, size_t compressionSpace) override
static vtkLZ4DataCompressor * New()
#define VTK_INT_MAX
Definition vtkType.h:144