fastCompression.h
Go to the documentation of this file.
1 //`
2 // Copyright 2017 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 
7 #ifndef PXR_BASE_TF_FAST_COMPRESSION_H
8 #define PXR_BASE_TF_FAST_COMPRESSION_H
9 
12 
13 #include "pxr/pxr.h"
14 
15 #include "pxr/base/tf/api.h"
16 
17 #include <cstddef>
18 
19 PXR_NAMESPACE_OPEN_SCOPE
20 
21 class TfFastCompression
22 {
23 public:
26  TF_API static size_t
27  GetMaxInputSize();
28 
32  TF_API static size_t
33  GetCompressedBufferSize(size_t inputSize);
34 
40  TF_API static size_t
41  CompressToBuffer(char const *input, char *compressed, size_t inputSize);
42 
46  TF_API static size_t
47  DecompressFromBuffer(char const *compressed, char *output,
48  size_t compressedSize, size_t maxOutputSize);
49 };
50 
51 
52 PXR_NAMESPACE_CLOSE_SCOPE
53 
54 #endif // PXR_BASE_TF_FAST_COMPRESSION_H
55 
56