VTK  9.2.6
vtkLZ4DataCompressor.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkLZ4DataCompressor.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
26#ifndef vtkLZ4DataCompressor_h
27#define vtkLZ4DataCompressor_h
28
29#include "vtkDataCompressor.h"
30#include "vtkIOCoreModule.h" // For export macro
31
32class VTKIOCORE_EXPORT vtkLZ4DataCompressor : public vtkDataCompressor
33{
34public:
36 void PrintSelf(ostream& os, vtkIndent indent) override;
38
45 size_t GetMaximumCompressionSpace(size_t size) override;
49 // Compression level getter required by vtkDataCompressor.
50 int GetCompressionLevel() override;
51
52 // Compression level setter required by vtkDataCompresor.
53 void SetCompressionLevel(int compressionLevel) override;
54
55 // Direct setting of AccelerationLevel allows more direct
56 // control over LZ4 compressor
57 vtkSetClampMacro(AccelerationLevel, int, 1, VTK_INT_MAX);
58 vtkGetMacro(AccelerationLevel, int);
59
60protected:
63
65
66 // Compression method required by vtkDataCompressor.
67 size_t CompressBuffer(unsigned char const* uncompressedData, size_t uncompressedSize,
68 unsigned char* compressedData, size_t compressionSpace) override;
69 // Decompression method required by vtkDataCompressor.
70 size_t UncompressBuffer(unsigned char const* compressedData, size_t compressedSize,
71 unsigned char* uncompressedData, size_t uncompressedSize) override;
72
73private:
75 void operator=(const vtkLZ4DataCompressor&) = delete;
76};
77
78#endif
Abstract interface for data compression classes.
a simple class to control print indentation
Definition vtkIndent.h:40
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:155