class
#include <eckit/utils/AECCompressor.h>
AECCompressor
Base classes
- class Compressor
Constructors, destructors, conversion operators
- AECCompressor()
- ~AECCompressor() override
Public functions
-
auto compress(const void* in,
size_t len,
eckit::
Buffer& out) const -> size_t override -
void uncompress(const void* in,
size_t len,
eckit::
Buffer& out, size_t outlen) const override
Function documentation
size_t eckit:: AECCompressor:: compress(const void* in,
size_t len,
eckit:: Buffer& out) const override
Parameters | |
---|---|
in | input buffer that holds the uncompressed bytesteam. |
len | input buffer size. |
out | output buffer to hold the compressed bytesteam. Buffer may be oversized, in which case resizing is implementation specific. Nevertheless, it is expected that implementations will take this as oppurtunity for optimising and avoid resizing. |
Returns | the size of the compressed bytestream inside out buffer, it is less or equal than out.size() |
Compresses the bytestream within the in buffer
void eckit:: AECCompressor:: uncompress(const void* in,
size_t len,
eckit:: Buffer& out,
size_t outlen) const override
Parameters | |
---|---|
in | input buffer that holds the compressed bytesteam. |
len | input buffer size. |
out | output buffer to hold the uncompressed bytesteam. |
outlen | the expected size of the uncompressed bytestream. Buffer may be resized or if large enough implementations will try to used what is passed in. This could be a way to reuse the same memory buffer in a tight loop. |
Uncompresses the bytestream within the in buffer Since some compression algorithms dont record uncompressed size in the bytestream, client code is required to record and handle the uncompressed size separately and pass it in via parameter outlen.