VTK  9.1.0
vtkZLibDataCompressor.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkZLibDataCompressor.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=========================================================================*/
23#ifndef vtkZLibDataCompressor_h
24#define vtkZLibDataCompressor_h
25
26#include "vtkDataCompressor.h"
27#include "vtkIOCoreModule.h" // For export macro
28
29class VTKIOCORE_EXPORT vtkZLibDataCompressor : public vtkDataCompressor
30{
31public:
33 void PrintSelf(ostream& os, vtkIndent indent) override;
35
42 size_t GetMaximumCompressionSpace(size_t size) override;
43
45
48 // Compression level getter required by vtkDataCompressor.
49 int GetCompressionLevel() override;
50
51 // Compression level setter required by vtkDataCompresor.
52 void SetCompressionLevel(int compressionLevel) override;
54
55protected:
58
60
61 // Compression method required by vtkDataCompressor.
62 size_t CompressBuffer(unsigned char const* uncompressedData, size_t uncompressedSize,
63 unsigned char* compressedData, size_t compressionSpace) override;
64 // Decompression method required by vtkDataCompressor.
65 size_t UncompressBuffer(unsigned char const* compressedData, size_t compressedSize,
66 unsigned char* uncompressedData, size_t uncompressedSize) override;
67
68private:
70 void operator=(const vtkZLibDataCompressor&) = delete;
71};
72
73#endif
Abstract interface for data compression classes.
a simple class to control print indentation
Definition: vtkIndent.h:113
Data compression using zlib.
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.
~vtkZLibDataCompressor() override
size_t UncompressBuffer(unsigned char const *compressedData, size_t compressedSize, unsigned char *uncompressedData, size_t uncompressedSize) override
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 CompressBuffer(unsigned char const *uncompressedData, size_t uncompressedSize, unsigned char *compressedData, size_t compressionSpace) override
static vtkZLibDataCompressor * New()
void SetCompressionLevel(int compressionLevel) override
Get/Set the compression level.
@ size
Definition: vtkX3D.h:259