HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TfFastCompression Class Reference

#include <fastCompression.h>

Static Public Member Functions

static TF_API size_t GetMaxInputSize ()
 
static TF_API size_t GetCompressedBufferSize (size_t inputSize)
 
static TF_API size_t CompressToBuffer (char const *input, char *compressed, size_t inputSize)
 
static TF_API size_t DecompressFromBuffer (char const *compressed, char *output, size_t compressedSize, size_t maxOutputSize)
 

Detailed Description

Definition at line 38 of file fastCompression.h.

Member Function Documentation

static TF_API size_t TfFastCompression::CompressToBuffer ( char const *  input,
char *  compressed,
size_t  inputSize 
)
static

Compress inputSize bytes in input and store the result in compressed. The compressed buffer must point to at least GetCompressedBufferSize(uncompressedSize) bytes. Return the number of bytes written to the compressed buffer. Issue a runtime error and return ~0 in case of an error.

static TF_API size_t TfFastCompression::DecompressFromBuffer ( char const *  compressed,
char *  output,
size_t  compressedSize,
size_t  maxOutputSize 
)
static

Decompress compressedSize bytes in compressed and store the result in output. No more than maxOutputSize bytes will be written to output.

static TF_API size_t TfFastCompression::GetCompressedBufferSize ( size_t  inputSize)
static

Return the largest possible compressed size for the given inputSize in the worst case (input is not compressible). This is larger than inputSize. If inputSize is larger than GetMaxInputSize(), return 0.

static TF_API size_t TfFastCompression::GetMaxInputSize ( )
static

Return the largest input buffer size that can be compressed with these functions. Guaranteed to be at least 200 GB.


The documentation for this class was generated from the following file: