vtkLZ4Compressor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkLZ4Compressor.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/
24 #ifndef vtkLZ4Compressor_h
25 #define vtkLZ4Compressor_h
26 
27 #include "vtkImageCompressor.h"
28 #include "vtkNew.h" // needed for vtkNew
29 #include "vtkPVVTKExtensionsFiltersRenderingModule.h" // needed for exports
30 
32 
34 {
35 public:
36  static vtkLZ4Compressor* New();
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
41 
47  vtkSetClampMacro(Quality, int, 0, 5);
48  vtkGetMacro(Quality, int);
50 
52 
56  int Compress() override;
57  int Decompress() override;
59 
61 
64  void SaveConfiguration(vtkMultiProcessStream* stream) override;
65  bool RestoreConfiguration(vtkMultiProcessStream* stream) override;
66  const char* SaveConfiguration() override;
67  const char* RestoreConfiguration(const char* stream) override;
69 
70 protected:
72  ~vtkLZ4Compressor() override;
73 
74  int Quality;
75 
76 private:
77  vtkLZ4Compressor(const vtkLZ4Compressor&) = delete;
78  void operator=(const vtkLZ4Compressor&) = delete;
79 
80  // Used when Quality > 1.
81  vtkNew<vtkUnsignedCharArray> TemporaryBuffer;
82 };
83 
84 #endif
virtual int Decompress()=0
Decompresses and geenartes the decompressed data as output.
virtual const char * SaveConfiguration()
Serialize compressor configuration (but not the data) into the stream.
Superclass for image compressor/decompressor used by Composite Managers.
Image compressor/decompressor that uses LZ4 for fast lossless compression.
virtual bool RestoreConfiguration(vtkMultiProcessStream *stream)
Restore state from the stream.
#define VTKPVVTKEXTENSIONSFILTERSRENDERING_EXPORT
virtual int Compress()=0
Call this method to compress the input and generate the compressed data.
static vtkObject * New()
void PrintSelf(ostream &os, vtkIndent indent) override