vtkLZ4Compressor.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
12 #ifndef vtkLZ4Compressor_h
13 #define vtkLZ4Compressor_h
14 
15 #include "vtkImageCompressor.h"
16 #include "vtkNew.h" // needed for vtkNew
17 #include "vtkPVVTKExtensionsFiltersRenderingModule.h" // needed for exports
18 
20 
22 {
23 public:
24  static vtkLZ4Compressor* New();
26  void PrintSelf(ostream& os, vtkIndent indent) override;
27 
29 
35  vtkSetClampMacro(Quality, int, 0, 5);
36  vtkGetMacro(Quality, int);
38 
40 
44  int Compress() override;
45  int Decompress() override;
47 
49 
52  void SaveConfiguration(vtkMultiProcessStream* stream) override;
53  bool RestoreConfiguration(vtkMultiProcessStream* stream) override;
54  const char* SaveConfiguration() override;
55  const char* RestoreConfiguration(const char* stream) override;
57 
58 protected:
60  ~vtkLZ4Compressor() override;
61 
62  int Quality;
63 
64 private:
65  vtkLZ4Compressor(const vtkLZ4Compressor&) = delete;
66  void operator=(const vtkLZ4Compressor&) = delete;
67 
68  // Used when Quality > 1.
69  vtkNew<vtkUnsignedCharArray> TemporaryBuffer;
70 };
71 
72 #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